std_prototypes.bas 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. FPRINT Outfile,""
  2. FPRINT Outfile,"// *************************************************"
  3. FPRINT Outfile,"// " + $BCX_STR_STD_PROTOS
  4. FPRINT Outfile,"// *************************************************"
  5. FPRINT Outfile,""
  6. IF NoRT=FALSE THEN
  7. IF Use_Clng THEN
  8. FPRINT Outfile,"long CLNG(double);"
  9. END IF
  10. IF Use_Cint THEN
  11. FPRINT Outfile,"int Cint(double);"
  12. END IF
  13. IF Use_StartupCode THEN
  14. FPRINT Outfile,"int BCX_StartupCode_(void);"
  15. END IF
  16. IF Use_ExitCode THEN
  17. FPRINT Outfile,"int BCX_ExitCode_(void);"
  18. END IF
  19. IF Use_Str_Cmp THEN
  20. FPRINT Outfile,"int str_cmp(char*, char*);"
  21. END IF
  22. IF Use_Eof THEN
  23. FPRINT Outfile,"int EoF (FILE*);"
  24. END IF
  25. IF Use_CopyFile THEN
  26. FPRINT Outfile,"void CopyFile (char *,char *,int=FALSE);"
  27. END IF
  28. IF Use_QBColor THEN
  29. FPRINT Outfile,"int qbcolor (int);"
  30. END IF
  31. IF Use_Cls THEN
  32. FPRINT Outfile,"void cls(void);"
  33. END IF
  34. IF Use_Color THEN
  35. FPRINT Outfile,"void color (int,int);"
  36. END IF
  37. IF Use_Locate THEN
  38. FPRINT Outfile,"void locate (int,int,int=1,int=12);"
  39. END IF
  40. IF Use_Run THEN
  41. FPRINT Outfile,"int Run (char*, int =1, int =0);"
  42. END IF
  43. IF Use_Randomize THEN
  44. FPRINT Outfile,"void randomize (unsigned int);"
  45. END IF
  46. IF Use_Midstr THEN
  47. FPRINT Outfile,"void midstr (char*, int, int, char *);"
  48. END IF
  49. IF Use_Swap THEN
  50. FPRINT Outfile,"void swap (UCHAR*,UCHAR*,int);"
  51. END IF
  52. IF UseFlag THEN
  53. FPRINT Outfile,"char* BCX_TmpStr(size_t);"
  54. END IF
  55. IF Use_sziif THEN
  56. FPRINT Outfile,"char* sziif (bool,char*,char*);"
  57. END IF
  58. IF Use_Using THEN
  59. FPRINT Outfile,"char* Using (char*,double);"
  60. END IF
  61. IF Use_TempFileName THEN
  62. FPRINT Outfile,"char* TempFileName (char*,char*);"
  63. END IF
  64. IF Use_AppExePath THEN
  65. FPRINT Outfile,"char* AppExePath (void);"
  66. END IF
  67. IF Use_AppExeName THEN
  68. FPRINT Outfile,"char* AppExeName (void);"
  69. END IF
  70. IF Use_Lcase THEN
  71. FPRINT Outfile,"char* lcase (char*);"
  72. END IF
  73. IF Use_Ucase THEN
  74. FPRINT Outfile,"char* ucase (char*);"
  75. END IF
  76. IF Use_Mid THEN
  77. FPRINT Outfile,"char* mid (char*, int, int=-1);"
  78. END IF
  79. IF Use_Ltrim THEN
  80. FPRINT Outfile,"char* ltrim (char*,char=32);"
  81. END IF
  82. IF Use_Rtrim THEN
  83. FPRINT Outfile,"char* rtrim (char*,char=32);"
  84. END IF
  85. IF Use_Trim THEN
  86. FPRINT Outfile,"char* trim (char*);"
  87. END IF
  88. IF Use_Strim THEN
  89. FPRINT Outfile,"char* strim (char*);"
  90. END IF
  91. IF Use_Left THEN
  92. FPRINT Outfile,"char* left (char*,int);"
  93. END IF
  94. IF Use_Right THEN
  95. FPRINT Outfile,"char* right (char*,int);"
  96. END IF
  97. IF Use_Rpad THEN
  98. FPRINT Outfile,"char* rpad (char*,int,int=32);"
  99. END IF
  100. IF Use_Lpad THEN
  101. FPRINT Outfile,"char* lpad (char*,int,int=32);"
  102. END IF
  103. IF Use_String THEN
  104. FPRINT Outfile,"char* stringx (int,int);"
  105. END IF
  106. IF Use_Repeat THEN
  107. FPRINT Outfile,"char* repeat (int,char*);"
  108. END IF
  109. IF Use_Extract THEN
  110. FPRINT Outfile,"char* extract (char*,char*);"
  111. END IF
  112. IF Use_Remain THEN
  113. FPRINT Outfile,"char* remain (char*,char*);"
  114. END IF
  115. IF Use_Reverse THEN
  116. FPRINT Outfile,"char* reverse (char*);"
  117. END IF
  118. IF Use_Command THEN
  119. FPRINT Outfile,"char* command (int=-1);"
  120. END IF
  121. IF Use_Mcase THEN
  122. FPRINT Outfile,"char* mcase (char*);"
  123. END IF
  124. IF Use_Replace THEN
  125. FPRINT Outfile,"char* replace (char*,char*,char*);"
  126. END IF
  127. IF Use_iReplace THEN
  128. FPRINT Outfile,"char* iReplace (char*,char*,char*);"
  129. END IF
  130. IF Use_Shell THEN
  131. FPRINT Outfile,"void Shell (char *);"
  132. END IF
  133. IF Use_Space THEN
  134. FPRINT Outfile,"char* space (int a);"
  135. END IF
  136. IF Use_Str THEN
  137. FPRINT Outfile,"char* str (double);"
  138. END IF
  139. IF Use_Strl THEN
  140. FPRINT Outfile,"char* strl (long double);"
  141. END IF
  142. IF Use_Findfirst THEN
  143. FPRINT Outfile,"char* findfirst (char*, FILE_FIND_DATA*);"
  144. END IF
  145. IF Use_Findnext THEN
  146. FPRINT Outfile,"char* findnext (FILE_FIND_DATA*);"
  147. END IF
  148. IF Use_Curdir THEN
  149. FPRINT Outfile,"char* curdir (void);"
  150. END IF
  151. IF Use_Sysdir THEN
  152. FPRINT Outfile,"char* sysdir (void);"
  153. END IF
  154. IF Use_Tempdir THEN
  155. FPRINT Outfile,"char* tempdir (void);"
  156. END IF
  157. IF Use_Environ THEN
  158. FPRINT Outfile,"char* Environ (char*);"
  159. END IF
  160. IF Use_Boolstr THEN
  161. FPRINT Outfile,"char* BoolStr (int);"
  162. END IF
  163. IF Use_Hex THEN
  164. FPRINT Outfile,"char* hex (int);"
  165. END IF
  166. IF Use_Bin THEN
  167. FPRINT Outfile,"char* Bin (int);"
  168. END IF
  169. IF Use_Oct THEN
  170. FPRINT Outfile,"char* oct (int);"
  171. END IF
  172. IF Use_Now THEN
  173. FPRINT Outfile,"char* now (void);"
  174. END IF
  175. IF Use_SearchPath THEN
  176. FPRINT Outfile,"char* SEARCHPATH (char *);"
  177. END IF
  178. IF Use_StrUpLow THEN
  179. FPRINT Outfile,"char* _strupr_(char *);"
  180. FPRINT Outfile,"char* _strlwr_(char *);"
  181. END IF
  182. IF Use_BcxSplitPath THEN
  183. FPRINT Outfile,"char* BcxSplitPath (char *, int);"
  184. FPRINT Outfile,"void _splitpath_(const char* path, char* drv, char* dir, char* name, char* ext);"
  185. END IF
  186. IF Use_Strtoken THEN
  187. FPRINT Outfile,"char* StrToken (char*,char*,int);"
  188. END IF
  189. IF Use_FileLocked THEN
  190. FPRINT Outfile,"int FileLocked (char*);"
  191. END IF
  192. IF Use_FillArray THEN
  193. FPRINT Outfile,"int fillarray (char *, int, int, void *);"
  194. END IF
  195. IF Use_Remove THEN
  196. FPRINT Outfile,"char* RemoveStr (char*,char*);"
  197. END IF
  198. IF Use_IRemove THEN
  199. FPRINT Outfile,"char* IRemoveStr (char*,char*);"
  200. END IF
  201. IF Use_Time THEN
  202. FPRINT Outfile,"char* timef (int i=0);"
  203. END IF
  204. IF Use_Join THEN
  205. FPRINT Outfile,"char* join (int, ... );"
  206. END IF
  207. IF Use_Enclose THEN
  208. FPRINT Outfile,"char* enc (char*, int=0, int=0);"
  209. END IF
  210. IF Use_Chr THEN
  211. FPRINT Outfile,"char* chr";
  212. FPRINT Outfile,"(int,int=0,int=0,int=0,int=0,int=0,int=0,int=0,int=0,int=0);"
  213. END IF
  214. IF Use_VChr THEN
  215. FPRINT Outfile,"char* vchr (int,...);"
  216. END IF
  217. IF Use_Freefile THEN
  218. FPRINT Outfile,"FILE* FreeFile (void);"
  219. END IF
  220. IF Use_PeekStr THEN
  221. FPRINT Outfile,"char* peekstr (LPVOID,int);"
  222. END IF
  223. IF Use_Asc THEN
  224. FPRINT Outfile,"int asc (char*,int=0);"
  225. END IF
  226. IF Use_Instrrev THEN
  227. FPRINT Outfile,"int InstrRev (char*,char*,int=0,int=0);"
  228. END IF
  229. IF Use_Instr THEN
  230. FPRINT Outfile,"int instr_b(char*,char*,int=0,int=0);"
  231. END IF
  232. IF UseLCaseTbl THEN
  233. FPRINT Outfile,"char *MakeLCaseTbl(void);"
  234. END IF
  235. IF Use_Stristr THEN
  236. FPRINT Outfile,"char *_stristr_(char*,char*);"
  237. END IF
  238. IF Use_StrStr THEN
  239. FPRINT Outfile,"char *_strstr_(char*,char*);"
  240. END IF
  241. IF Use_Verify THEN
  242. FPRINT Outfile,"int Verify (char *, char *);"
  243. FPRINT Outfile,"int VerifyInstr(char*,char*,int=0);"
  244. END IF
  245. IF Use_Retain THEN
  246. FPRINT Outfile,"char* Retain (char*,char *);"
  247. END IF
  248. IF Use_LoadFile THEN
  249. FPRINT Outfile,"char* LoadFile (char*);"
  250. END IF
  251. IF Use_Inchr THEN
  252. FPRINT Outfile,"int inchr (char*,char*);"
  253. END IF
  254. IF Use_Idxqsort THEN
  255. FPRINT Outfile,"int IdxCompare (const void *,const void *);"
  256. END IF
  257. IF Use_IdxqsortSt THEN
  258. FPRINT Outfile,"int IdxCompareSt (const void *,const void *);"
  259. END IF
  260. IF Use_PtrqsortSt THEN
  261. FPRINT Outfile,"int PtrCompareSt (const void *,const void *);"
  262. END IF
  263. IF Use_Strqsorta THEN
  264. FPRINT Outfile,"int StrCompareA (const void *,const void *);"
  265. END IF
  266. IF Use_Strqsortd THEN
  267. FPRINT Outfile,"int StrCompareD (const void *,const void *);"
  268. END IF
  269. IF Use_DynStrqsorta THEN
  270. FPRINT Outfile,"int DynStrCompareA (const void *,const void *);"
  271. END IF
  272. IF Use_DynStrqsortd THEN
  273. FPRINT Outfile,"int DynStrCompareD (const void *,const void *);"
  274. END IF
  275. IF Use_Numqsortaint THEN
  276. FPRINT Outfile,"int NumCompareAint (const void *,const void *);"
  277. END IF
  278. IF Use_Numqsortdint THEN
  279. FPRINT Outfile,"int NumCompareDint (const void *,const void *);"
  280. END IF
  281. IF Use_Numqsortafloat THEN
  282. FPRINT Outfile,"int NumCompareAfloat (const void *,const void *);"
  283. END IF
  284. IF Use_Numqsortdfloat THEN
  285. FPRINT Outfile,"int NumCompareDfloat (const void *,const void *);"
  286. END IF
  287. IF Use_Numqsortadouble THEN
  288. FPRINT Outfile,"int NumCompareAdouble (const void *,const void *);"
  289. END IF
  290. IF Use_Numqsortddouble THEN
  291. FPRINT Outfile,"int NumCompareDdouble (const void *,const void *);"
  292. END IF
  293. IF Use_Like THEN
  294. FPRINT Outfile,"int like (char*,char*);"
  295. END IF
  296. IF Use_Tally THEN
  297. FPRINT Outfile,"int tally (char*,char*,int=0);"
  298. END IF
  299. IF Use_Inkey THEN
  300. FPRINT Outfile,"char* inkey (void);"
  301. END IF
  302. IF Use_InkeyD THEN
  303. FPRINT Outfile,"int inkeyd (void);"
  304. END IF
  305. '/***** 2010-12-08 Added to support INSTAT-AIR *****/
  306. IF Use_Instat THEN
  307. FPRINT Outfile,"int kbhit(void);"
  308. END IF
  309. IF Use_GetCh THEN
  310. FPRINT Outfile,"int _getch_(int);"
  311. END IF
  312. IF Use_Bin2dec THEN
  313. FPRINT Outfile,"int Bin2Dec (char*);"
  314. END IF
  315. IF Use_Hex2Dec THEN
  316. FPRINT Outfile,"int Hex2Dec (char*);"
  317. END IF
  318. IF Use_Download THEN
  319. FPRINT Outfile,"int Download (char*,char*);"
  320. END IF
  321. IF Use_Embed THEN
  322. FPRINT Outfile,"char* GetResource (int* );"
  323. END IF
  324. IF Use_Exist THEN
  325. IF Use_Osx THEN
  326. FPRINT Outfile,"bool Exist (char*);"
  327. ELSE
  328. FPRINT Outfile,"BOOL Exist (char*);"
  329. END IF
  330. END IF
  331. IF Use_Ins THEN
  332. FPRINT Outfile,"char* ins (char *S, int i, char *a);"
  333. END IF
  334. IF Use_Del THEN
  335. FPRINT Outfile,"char* del (char*,int,int);"
  336. END IF
  337. IF Use_Pause THEN
  338. FPRINT Outfile,"void Pause (void);"
  339. END IF
  340. IF Use_Keypress THEN
  341. FPRINT Outfile,"int keypress (void);"
  342. END IF
  343. IF Use_Lof THEN
  344. FPRINT Outfile,"DWORD lof (char*);"
  345. END IF
  346. IF Use_Sgn THEN
  347. FPRINT Outfile,"double sgn (double);"
  348. END IF
  349. IF Use_Round THEN
  350. FPRINT Outfile,"double Round (double,int);"
  351. END IF
  352. IF Use_Rnd THEN
  353. FPRINT Outfile,"float rnd (void);"
  354. END IF
  355. IF Use_Exp THEN
  356. FPRINT Outfile,"double Exp (double);"
  357. END IF
  358. IF Use_Min THEN
  359. FPRINT Outfile,"double _MIN_ (double,double);"
  360. END IF
  361. IF Use_Max THEN
  362. FPRINT Outfile,"double _MAX_ (double,double);"
  363. END IF
  364. IF Use_Timer THEN
  365. FPRINT Outfile,"float timer (void);"
  366. END IF
  367. IF Use_Iif THEN
  368. FPRINT Outfile,"double iif (bool,double,double);"
  369. END IF
  370. IF Use_Loc THEN
  371. FPRINT Outfile,"int loc (FILE *fp, int fplen);"
  372. END IF
  373. IF Use_Rec THEN
  374. FPRINT Outfile,"int rec (FILE *fp, int fplen);"
  375. END IF
  376. IF Use_RecCount THEN
  377. FPRINT Outfile,"int reccount (FILE *fp, int fplen);"
  378. END IF
  379. IF Use_Scan THEN
  380. FPRINT Outfile,"int scan (char *input, char *format, ... );"
  381. END IF
  382. IF Use_Split THEN
  383. FPRINT Outfile,"int Split (char [][65535], char*, char*, int=0);"
  384. END IF
  385. IF Use_DSplit THEN
  386. FPRINT Outfile,"int DSplit (PCHAR *, char*, char*, int=0);"
  387. END IF
  388. IF Use_SysStr THEN
  389. FPRINT Outfile,"BSTR SysStr (char * szIn, int=0, int=0);"
  390. END IF
  391. IF Use_WideToAnsi THEN
  392. FPRINT Outfile,"char* WideToAnsi (wchar_t *, UINT=0, DWORD=0);"
  393. END IF
  394. IF Use_AnsiToWide THEN
  395. FPRINT Outfile,"wchar_t* AnsiToWide (char*,UINT=0,DWORD=0);"
  396. END IF
  397. IF Use_Cvi THEN
  398. FPRINT Outfile,"short CVI (char*);"
  399. END IF
  400. IF Use_Mki THEN
  401. FPRINT Outfile,"char* MKI (short);"
  402. END IF
  403. IF Use_Cvl THEN
  404. FPRINT Outfile,"long CVL (char*);"
  405. END IF
  406. IF Use_Mkl THEN
  407. FPRINT Outfile,"char* MKL (int);"
  408. END IF
  409. IF Use_Cvs THEN
  410. FPRINT Outfile,"float CVS (char*);"
  411. END IF
  412. IF Use_Mks THEN
  413. FPRINT Outfile,"char* MKS (float);"
  414. END IF
  415. IF Use_Cvd THEN
  416. FPRINT Outfile,"double CVD (char*);"
  417. END IF
  418. IF Use_Cvld THEN
  419. FPRINT Outfile,"long double CVLD (char*);"
  420. END IF
  421. IF Use_Mkd THEN
  422. FPRINT Outfile,"char* MKD (double);"
  423. END IF
  424. IF Use_Mkld THEN
  425. FPRINT Outfile,"char* MKLD (long double);"
  426. END IF
  427. IF Use_OSVersion THEN
  428. FPRINT Outfile,"int OSVersion (void);"
  429. END IF
  430. IF Use_Dynacall THEN
  431. FPRINT Outfile,"HINSTANCE BCX_LoadDll(char *);"
  432. FPRINT Outfile,"void BCX_UnloadDll(void);"
  433. FPRINT Outfile,"typedef int (CALLBACK *DYNACALL1)(void);"
  434. FPRINT Outfile,"int BCX_DynaCall(char *, char *, int, ...);"
  435. END IF
  436. IF Use_DynamicA THEN
  437. FPRINT Outfile,"void* CreateArr (void*,int,int,int,...);"
  438. FPRINT Outfile,"void* CreateArr_internal(void*, int, int, int, va_list);"
  439. FPRINT Outfile,"void DestroyArr (void**,int,int);"
  440. END IF
  441. IF Use_ContainedIn THEN
  442. FPRINT Outfile,"int containedin(char * ,char **,int=0);"
  443. END IF
  444. IF Use_FindInType THEN
  445. FPRINT Outfile,"int FindInType(char *,char *,int,int,int,int=0,int* =0);"
  446. END IF
  447. IF Use_SingleFile = FALSE THEN
  448. OPEN HFile$ FOR OUTPUT AS fpHFile
  449. END IF
  450. '/***** 2010-11-10 emit wxApp Class Definition - AIR *****/
  451. /***** 2010-11-24 Change TO NOT emit wxApp CLASS Definition FOR WX CONSOLE Apps -AIR *****/
  452. '/***** 2010-12-01 Switched to using BCXSPLITPATH$ per James Fuller's suggestion -AIR *****/
  453. IF Use_Wx THEN
  454. FPRINT Outfile,""
  455. FPRINT Outfile,"class ";bcxsplitpath$(FileIn$, FNAME);": public wxApp {"
  456. FPRINT Outfile," public:"
  457. FPRINT Outfile," virtual bool OnInit();"
  458. FPRINT Outfile,"};"
  459. FPRINT Outfile,""
  460. FPRINT Outfile,"IMPLEMENT_APP(";bcxsplitpath$(FileIn$, FNAME);")"
  461. FPRINT Outfile,""
  462. END IF
  463. '/***** 2010-12-10 Socket Support -AIR *****/
  464. if Use_Socket then
  465. FPRINT Outfile,""
  466. FPRINT Outfile,"sockaddr_in sock_addr (char* ,int=80);"
  467. FPRINT Outfile,"int connect_socket (sockaddr_in);"
  468. FPRINT Outfile,"int BcxSocket (char* ,int=80);"
  469. FPRINT Outfile,"int BcxSocketSend (int, char *);"
  470. FPRINT Outfile,"int BcxSocketRead (int, char *);"
  471. FPRINT Outfile,"void BcxSocketClose(int);"
  472. FPRINT Outfile,""
  473. end if
  474. '/***** 2013-06-26 New REGEX Keywords -AIR *****/
  475. IF Use_RegEx then
  476. FPRINT Outfile,"bool regmatch (char *, char *, REGEX* );"
  477. END IF
  478. END IF 'IF NoRT=FALSE