home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c222 / 1.ddi / INC / PROTO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-01-17  |  10.6 KB  |  348 lines

  1. /*********************
  2.  *
  3.  *  proto.h [NON-ANSI] - declaration of C functions.
  4.  *
  5.  *  Purpose: Prototype of each function in the Blackstar Library.
  6.  *
  7.  *  Blackstar C Function Library
  8.  *  (c) Copyright 1985,1989 Sterling Castle Software
  9.  *
  10.  *******/
  11.  
  12. /*
  13.  *  console functions
  14.  */
  15.  
  16. void    co_attr(short attr);
  17. char *  co_sattr(short attr);
  18. void    co_mode(int mode, short fcolor, short bcolor);
  19. void    co_curset(short col, short row);
  20. void    co_curget(short *col, short *row);
  21. void    co_init(short console);
  22. void    co_color(short fcolor, short bcolor);
  23. void    co_clr(void);
  24. void    co_eeol(void);
  25. int     co_putc(char c);
  26. int     co_puts(char * str);
  27. int     co_getc(void);
  28. char *  co_gets(char * str);
  29. void    co_type(int type);
  30. char *  co_set(int mod, char *val);
  31.  
  32. /*
  33.  *  file I/O functions
  34.  */
  35.  
  36. int     fl_getl(char * buff, FILE *fp);
  37. int     fl_getln(char * buff, FILE *fp);
  38. int     fl_putl(char * buff, FILE *fp);
  39. int     fl_getvr(char * buff, FILE *fp);
  40. int     fl_getr(char * buff, FILE *fp, int len);
  41. int     fl_putr(char * buff, FILE *fp, int len);
  42. int     fl_putvr(char * buff, FILE *fp);
  43. void    fl_mkpath(char * path, char * dr, char * dir, char * name, char * ext);
  44. void    fl_pathex(char * ext, char * path);
  45. void    fl_pathnm(char * name, char * path);
  46. char *  fl_find(char * path);
  47. int     fl_files(char * fnames, char * fpath, int ext_f);
  48.  
  49. /*
  50.  *  graphics functions
  51.  */
  52.  
  53. void    gr_fill(int seedx, int seedy);
  54. void    gr_fseed(int x1, int x2, int y1);
  55. int     gr_fnb(int x, int y);
  56. int     gr_fpb(int x, int y);
  57. void    gr_init(int mode, int fcolr, int bcolr, char * palette);
  58. #define gr_pallet(a) (gr_palette(a))
  59. void    gr_palette(char * palette);
  60. void    gr_bcolor(char bcolr);
  61. void    gr_color(char fcolr, char bcolr);
  62. void    gr_pen(int xorf, int color);
  63. void    gr_pos(int x, int y);
  64. void    gr_setpt(int x, int y);
  65. void    gr_xorp(int x, int y);
  66. int     gr_getpt(int x, int y);
  67. void    gr_putpt(int x, int y, char color);
  68. char *  gr_getwin(int x1, int y1, int x2, int y2);
  69. void    gr_putwin(char * buff, int x1, int y1, int x2, int y2);
  70. void    gr_clip(int *x, int *y);
  71. void    gr_line(int x1, int y1, int x2, int y2);
  72. void    gr_lineto(int x, int y);
  73. void    gr_draw(short *shape);
  74. void    gr_scale(short *shape, float factor);
  75. short * gr_scan(short *shape);
  76. char *  gr_getp(char * pic);
  77. void    gr_putp(char * pic);
  78. void    gr_box(int x1, int y1, int x2, int y2);
  79. void    gr_poly(short *shape);
  80. void    gr_windo(int minx, int miny, int maxx, int maxy);
  81. void    gr_wfull(void);
  82. void    gr_wpush(void);
  83. void    gr_wpop(void);
  84. void    gr_clr(void);
  85. void    gr_wfill(int color);
  86. void    gr_wgetp(char * buff);
  87. void    gr_wputp(char * buff);
  88.  
  89. /*
  90.  *  interrupt functions
  91.  */
  92.  
  93. int     in_setint(int vector, int (*function)(), char * stack, int type);
  94. int     in_remint(int intno);
  95. void    in_tsr(void);
  96.  
  97. /*
  98.  *  keyboard functions
  99.  */
  100.  
  101. int     kb_getf(char * str, int n);
  102. int     kb_isfun(char c);
  103. int     kb_iskey(char c);
  104. int     kb_isbrk(char c);
  105. int     kb_input(char * msg, char * str);
  106. int     kb_inyorn(char * prompt);
  107. int     kb_getc(void);
  108. int     kb_getch(void);
  109. char *  kb_gets(char * str);
  110. void    kb_init(char * ftbl, char * xtbl, char * btbl);
  111. int     kb_getchar(void);
  112. int     kb_ungetc(char c);
  113. int     kb_inkey(void);
  114. int     kb_hit(void);
  115. void    kb_pause(void);
  116. int     kb_scanf(const char * format, ...);
  117. void    kb_tpause(int time);
  118. void    kb_clr(void);
  119.  
  120. /*
  121.  *  memory functions
  122.  */
  123.  
  124. void    me_upper(char * buf, int n);
  125. void    me_lower(char * buf, int n);
  126. int     me_cmpu(char * buf1, char * buf2, int n);
  127. void    me_squ(char * buf, char c, int n);
  128.  
  129. /*
  130.  *  mouse functions
  131.  */
  132.  
  133. int     ms_init(void);
  134. int     ms_stat(void);
  135. void    ms_cson(void);
  136. void    ms_csof(void);
  137. int     ms_cget(void);
  138. void    ms_cset(int col, int row);
  139. int     ms_press(void);
  140. int     ms_rels(void);
  141. void    ms_field(int col1, int row1, int col2, int row2);
  142. int     ms_motion(void);
  143. void    ms_shape(int hhot, int vhot, int *masks);
  144. void    ms_intr(int mask, int(*routine)(), int dseg);
  145.  
  146. /*
  147.  *  printer functions
  148.  */
  149.  
  150. int     pr_putc(char c);
  151. int     pr_putch(char c);
  152. int     pr_puts(char * str);
  153. int     pr_putl(char * buff);
  154. void    pr_prtscr(void);
  155. void    pr_signal(int on);
  156. void    pr_putff(void);
  157. int     pr_stat(void);
  158. void    pr_init(int prtype);
  159. char *  pr_attr(int type);
  160. void    pr_sattr(int type);
  161. char *  pr_tabs(void);
  162. int     pr_pause(void);
  163.  
  164. /*
  165.  *  screen functions
  166.  */
  167.  
  168. void    sc_vline(int col, int r1, int r2);
  169. void    sc_hline(int row, int c1, int c2);
  170. void    sc_box(int x1, int y1, int x2, int y2);
  171. void    sc_scrlu(int row, int nrows);
  172. void    sc_scrld(int row, int nrows);
  173. void    sc_clrf(int n);
  174. int     sc_printf(const char * format, ...);
  175. void    sc_putfi(int i, int n);
  176. void    sc_putsfl(char * str, int n);
  177. void    sc_putsf(char * str, int n);
  178. void    sc_putlf(char * line, int n);
  179. void    sc_putsfr(char * str, int n);
  180. void    sc_putsflr(char * str, int n);
  181. void    sc_putsflc(char * str, int n);
  182. void    sc_putsfc(char * str, int n);
  183. void    sc_putifr(int i, int n);
  184. void    sc_putifc(int i, int n);
  185. void    sc_movcur(int dcol, int drow);
  186. void    sc_cursor(int flag);
  187. void    sc_clip(int *col, int *row);
  188. int     sc_getrow(void);
  189. int     sc_getcol(void);
  190. void    sc_setcur(int col, int row);
  191. void    sc_init(int mode, char fcolr, char bcolr);
  192. void    sc_color(char fcolr, char bcolr);
  193. void    sc_font(struct FONT *fonts);
  194. void    sc_attr(int atype);
  195. int     sc_putc(char c);
  196. void    sc_putsv(char * str);
  197. int     sc_puts(char * str);
  198. void    sc_putl(char * str);
  199. int     sc_getch(int col, int row);
  200. void    sc_putch(char c);
  201. void    sc_eeol(void);
  202. void    sc_clr(void);
  203. void    sc_clrwin(int col1, int row1, int col2, int row2);
  204. void    sc_scroll(int nrows, int col1, int row1, int col2, int row2);
  205. void    sc_windo(int col1, int row1, int col2, int row2);
  206. char *  sc_getwin(int x1, int y1, int x2, int y2);
  207. void    sc_putwin(char * buff, int x1, int y1, int x2, int y2);
  208. void    sc_home(void);
  209. void    sc_winfull(void);
  210. void    sc_winpush(void);
  211. void    sc_winpop(void);
  212.  
  213. /*
  214.  *  serial port functions
  215.  */
  216.  
  217. int     si_init(int port, struct SI_PARMS *parms);
  218. int     si_stat(int port);
  219. int     si_out(int port, char c);
  220. int     si_inp(int port);
  221. int     si_putc(int port, char c);
  222. int     si_getc(int port);
  223.  
  224. /*
  225.  *  string functions
  226.  */
  227.  
  228. char *  st_squ(char * str, char c);
  229. int     st_ccmpu(char * s1, char * s2, int n);
  230. int     st_ncmpi(char * s1, char * s2, int n);
  231. void    st_ccat(char * s1, char * s2, int n);
  232. void    st_bcpy(char * buff, char * str);
  233. char *  st_instr(char * str2, char * str1);
  234. char *  st_instri(char * str2, char * str1);
  235. char *  st_inbuf(char * str, char * buff, int n);
  236. int     st_patmai(char * str1, char * str2);
  237. int     st_patma(char * str1, char * str2);
  238. char *  st_bllz(char * str);
  239. char *  st_zlbl(char * str);
  240. char *  st_delc(char * str, char c);
  241. int     st_wild(char * str);
  242. void    st_tabr(char * str);
  243. void    st_ptrs(char * buff, char * ptrs[], int cnt);
  244. int     st_toi(char * str);
  245. long    st_tol(char * str);
  246. float   st_tof(char * str);
  247. char *  st_upper(char * str);
  248. char *  st_lower(char * str);
  249. void    st_movr(char * str, int n);
  250. void    st_movl(char * str, int n);
  251. void    st_jusr(char * str, int n);
  252. void    st_cntr(char * str, int n);
  253. char *  st_subc(char * string, char c, char subc);
  254. char *  st_left(char * str1, char * str2, short n);
  255. char *  st_right(char * str1, char * str2, short n);
  256. char *  st_substr(char * str1, char * str2, short pos, short n);
  257.  
  258. /*
  259.  *  sytem functions
  260.  */
  261.  
  262. void    sy_gtime(void);
  263. void    sy_gdate(void);
  264. void    sy_setintf(int vector, int (*function)());
  265. void    sy_setintv(int vector, int *address);
  266. void    sy_getintv(int vector, int *address);
  267. char *  sy_ffdir(char * path, int attr);
  268. char *  sy_fdir(void);
  269. void    sy_getsys(void);
  270. int     sy_isdrive(int driveno);
  271. int     sy_indosf(int *ptr);
  272. void    sy_beep(void);
  273. void    sy_abort(void);
  274. int     sy_doff(void *data);
  275. int     sy_dseg(void *data);
  276. int     sy_pseg(int (*function)());
  277. int     sy_poff(int (*function)());
  278.  
  279. /*
  280.  *  text functions
  281.  */
  282.  
  283. int     tx_putf(FILE *fp);
  284. long    tx_putfp(FILE *fp, long flpos);
  285. void    tx_mesg(struct MESG *mesg);
  286. char *  tx_putw(char * str);
  287. char *  tx_putl(char * line);
  288. void    tx_windo(int col1, int row1, int col2, int row2);
  289. int     tx_menu(struct MENU *menu);
  290. char *  tx_menust(struct MENU *menu);
  291. void    tx_menuclr(struct MENU *menu);
  292. void    tx_menudsp(struct MENU *menu);
  293. void    tx_menuf(struct MENU *menu, short item, short attr);
  294. int     tx_menusel(struct MENU *menu);
  295.  
  296. /*
  297.  *  utility functions
  298.  */
  299.  
  300. void    ut_crypt(char * buff, char key, int nbytes);
  301. void    ut_gtod(void);
  302. void    ut_gdate(void);
  303. void    ut_gtime(void);
  304. long    ut_datel(void);
  305. long    ut_timel(void);
  306. void    ut_dates(struct DATE *sdate);
  307. void    ut_times(struct TIME *stime);
  308. void    ut_sdatestr(char * str, struct DATE *sdate);
  309. void    ut_stimestr(char * str, struct TIME *stime);
  310. void    ut_ldates(struct DATE *sdate, long ldate);
  311. void    ut_ldatestr(char * str, long ldate);
  312. void    ut_ltimestr(char * str, long ltime);
  313. void    ut_ltimes(struct TIME *stime, long ltime);
  314. void    ut_hmtimestr(char * str, int hr, int mn);
  315. void    ut_pause(int time);
  316. int     ut_today(void);
  317. int     ut_sday(struct DATE *sdate);
  318. char *  ut_ldaystr(long ldate);
  319. int     ut_sjday(struct DATE *sdate);
  320. char *  ut_daystr(int day);
  321. char *  ut_mostr(int mo);
  322. char *  ut_thismo(void);
  323. char *  ut_todaystr(void);
  324. void    ut_dump(char * memptr, int nbytes);
  325. int     ut_datecmp(struct DATE *sdate1, struct DATE *sdate2);
  326. int     ut_datesub(struct DATE *sdate1, struct DATE *sdate2);
  327. void    ut_dateadd(struct DATE *sdate1, struct DATE *sdate2);
  328. int     ut_datedif(struct DATE *sdate1, struct DATE *sdate2);
  329. long    ut_ldatedif(long ldate1, long ldate2);
  330. int     ut_timecmp(struct TIME *time1, struct TIME *time2);
  331. void    ut_timeadd(struct TIME *time1, struct TIME *time2);
  332. void    ut_timesub(struct TIME *time1, struct TIME *time2);
  333. long    ut_ldateadd(long ldate1, long ldate2);
  334. long    ut_ldatesub(long ldate1, long ldate2);
  335. long    ut_ltimeadd(long ltime1, long ltime2);
  336. long    ut_ltimesub(long ltime1, long ltime2);
  337. int     ut_stdates(struct DATE *sdate, char * str);
  338. int     ut_sttimes(struct TIME *stime, char * str);
  339. long    ut_stdatel(char * str);
  340. long    ut_sttimel(char * str);
  341. int     ut_isleap(int yr);
  342. int     ut_push(int val);
  343. int     ut_pop();
  344. char    ut_xlateb(char byte, char * table);
  345. int     ut_xtable(char * str, char * table[]);
  346. int     ut_xlprox(char * str, char * table[]);
  347. char *  ut_xlstr(char * str, char * table[]);
  348.