FreeBASIC  0.91.0
hlp.bi
Go to the documentation of this file.
1 #ifndef __HELP_BI__
2 #define __HELP_BI__
3 
4 #ifndef INVALID
5 const INVALID = -1
6 #endif
7 
8 ''
9 '' helper module protos
10 ''
11 
12 declare function hMatchText _
13  ( _
14  byval txt as zstring ptr _
15  ) as integer
16 
17 declare function hMatch _
18  ( _
19  byval token as integer _
20  ) as integer
21 
22 declare function hMakeProfileLabelName _
23  ( _
24  ) as zstring ptr
25 
26 declare function hFBrelop2IRrelop _
27  ( _
28  byval tk as integer _
29  ) as integer
30 
31 declare function hFileExists _
32  ( _
33  byval filename as zstring ptr _
34  ) as integer
35 
36 declare sub hClearName _
37  ( _
38  byval src as zstring ptr _
39  )
40 
41 declare sub hUcase _
42  ( _
43  byval src as const zstring ptr, _
44  byval dst as zstring ptr _
45  )
46 
47 declare function hStripUnderscore _
48  ( _
49  byval symbol as zstring ptr _
50  ) as string
51 
52 declare function hStripExt _
53  ( _
54  byval filename as zstring ptr _
55  ) as string
56 
57 declare function hStripPath _
58  ( _
59  byval filename as zstring ptr _
60  ) as string
61 
62 declare function hStripFilename _
63  ( _
64  byval filename as zstring ptr _
65  ) as string
66 
67 declare function hGetFileExt _
68  ( _
69  byval fname as zstring ptr _
70  ) as string
71 
72 declare sub hReplaceSlash( byval s as zstring ptr, byval char as integer )
73 
74 declare function pathStripDiv( byref path as string ) as string
75 declare function pathIsAbsolute( byval path as zstring ptr ) as integer
76 
77 declare function hFloatToHex _
78  ( _
79  byval value as double, _
80  byval dtype as integer _
81  ) as string
82 
83 declare function hCheckFileFormat _
84  ( _
85  byval f as integer _
86  ) as integer
87 
88 declare function hCurDir( ) as string
89 
90 declare function hHexUInt _
91  ( _
92  byval value as uinteger _
93  ) as zstring ptr
94 
95 declare function hIsValidSymbolName( byval sym as zstring ptr ) as integer
96 
97 declare function strUnquote(byref s as string) as string
98 
99 #include once "hlp-str.bi"
100 
101 #define hIsCharLower(_c) ( (_c >= asc("a")) andalso (_c <= asc("z")) )
102 #define hIsCharUpper(_c) ( (_c <= asc("Z")) andalso (_c >= asc("A")) )
103 #define hIsChar(_c) ( hIsCharLower(_c) orelse hIsCharUpper(_c) )
104 #define hIsCharNumeric(_c) ( (_c <= asc("9")) andalso (_c >= asc("0")) )
105 
106 '' ensure float values over 2^63 are converted correctly
107 #define hCastFloatToULongint(f) cunsg( iif( (f) >= 1.e+16, clngint( (f) * 0.5 ) shl 1, clngint( f ) ) )
108 
109 #endif ''__HELP_BI__
110