home *** CD-ROM | disk | FTP | other *** search
- /*********************
- *
- * proto.h [NON-ANSI] - declaration of C functions.
- *
- * Purpose: Prototype of each function in the Blackstar Library.
- *
- * Blackstar C Function Library
- * (c) Copyright 1985,1989 Sterling Castle Software
- *
- *******/
-
- /*
- * console functions
- */
-
- void co_attr(short attr);
- char * co_sattr(short attr);
- void co_mode(int mode, short fcolor, short bcolor);
- void co_curset(short col, short row);
- void co_curget(short *col, short *row);
- void co_init(short console);
- void co_color(short fcolor, short bcolor);
- void co_clr(void);
- void co_eeol(void);
- int co_putc(char c);
- int co_puts(char * str);
- int co_getc(void);
- char * co_gets(char * str);
- void co_type(int type);
- char * co_set(int mod, char *val);
-
- /*
- * file I/O functions
- */
-
- int fl_getl(char * buff, FILE *fp);
- int fl_getln(char * buff, FILE *fp);
- int fl_putl(char * buff, FILE *fp);
- int fl_getvr(char * buff, FILE *fp);
- int fl_getr(char * buff, FILE *fp, int len);
- int fl_putr(char * buff, FILE *fp, int len);
- int fl_putvr(char * buff, FILE *fp);
- void fl_mkpath(char * path, char * dr, char * dir, char * name, char * ext);
- void fl_pathex(char * ext, char * path);
- void fl_pathnm(char * name, char * path);
- char * fl_find(char * path);
- int fl_files(char * fnames, char * fpath, int ext_f);
-
- /*
- * graphics functions
- */
-
- void gr_fill(int seedx, int seedy);
- void gr_fseed(int x1, int x2, int y1);
- int gr_fnb(int x, int y);
- int gr_fpb(int x, int y);
- void gr_init(int mode, int fcolr, int bcolr, char * palette);
- #define gr_pallet(a) (gr_palette(a))
- void gr_palette(char * palette);
- void gr_bcolor(char bcolr);
- void gr_color(char fcolr, char bcolr);
- void gr_pen(int xorf, int color);
- void gr_pos(int x, int y);
- void gr_setpt(int x, int y);
- void gr_xorp(int x, int y);
- int gr_getpt(int x, int y);
- void gr_putpt(int x, int y, char color);
- char * gr_getwin(int x1, int y1, int x2, int y2);
- void gr_putwin(char * buff, int x1, int y1, int x2, int y2);
- void gr_clip(int *x, int *y);
- void gr_line(int x1, int y1, int x2, int y2);
- void gr_lineto(int x, int y);
- void gr_draw(short *shape);
- void gr_scale(short *shape, float factor);
- short * gr_scan(short *shape);
- char * gr_getp(char * pic);
- void gr_putp(char * pic);
- void gr_box(int x1, int y1, int x2, int y2);
- void gr_poly(short *shape);
- void gr_windo(int minx, int miny, int maxx, int maxy);
- void gr_wfull(void);
- void gr_wpush(void);
- void gr_wpop(void);
- void gr_clr(void);
- void gr_wfill(int color);
- void gr_wgetp(char * buff);
- void gr_wputp(char * buff);
-
- /*
- * interrupt functions
- */
-
- int in_setint(int vector, int (*function)(), char * stack, int type);
- int in_remint(int intno);
- void in_tsr(void);
-
- /*
- * keyboard functions
- */
-
- int kb_getf(char * str, int n);
- int kb_isfun(char c);
- int kb_iskey(char c);
- int kb_isbrk(char c);
- int kb_input(char * msg, char * str);
- int kb_inyorn(char * prompt);
- int kb_getc(void);
- int kb_getch(void);
- char * kb_gets(char * str);
- void kb_init(char * ftbl, char * xtbl, char * btbl);
- int kb_getchar(void);
- int kb_ungetc(char c);
- int kb_inkey(void);
- int kb_hit(void);
- void kb_pause(void);
- int kb_scanf(const char * format, ...);
- void kb_tpause(int time);
- void kb_clr(void);
-
- /*
- * memory functions
- */
-
- void me_upper(char * buf, int n);
- void me_lower(char * buf, int n);
- int me_cmpu(char * buf1, char * buf2, int n);
- void me_squ(char * buf, char c, int n);
-
- /*
- * mouse functions
- */
-
- int ms_init(void);
- int ms_stat(void);
- void ms_cson(void);
- void ms_csof(void);
- int ms_cget(void);
- void ms_cset(int col, int row);
- int ms_press(void);
- int ms_rels(void);
- void ms_field(int col1, int row1, int col2, int row2);
- int ms_motion(void);
- void ms_shape(int hhot, int vhot, int *masks);
- void ms_intr(int mask, int(*routine)(), int dseg);
-
- /*
- * printer functions
- */
-
- int pr_putc(char c);
- int pr_putch(char c);
- int pr_puts(char * str);
- int pr_putl(char * buff);
- void pr_prtscr(void);
- void pr_signal(int on);
- void pr_putff(void);
- int pr_stat(void);
- void pr_init(int prtype);
- char * pr_attr(int type);
- void pr_sattr(int type);
- char * pr_tabs(void);
- int pr_pause(void);
-
- /*
- * screen functions
- */
-
- void sc_vline(int col, int r1, int r2);
- void sc_hline(int row, int c1, int c2);
- void sc_box(int x1, int y1, int x2, int y2);
- void sc_scrlu(int row, int nrows);
- void sc_scrld(int row, int nrows);
- void sc_clrf(int n);
- int sc_printf(const char * format, ...);
- void sc_putfi(int i, int n);
- void sc_putsfl(char * str, int n);
- void sc_putsf(char * str, int n);
- void sc_putlf(char * line, int n);
- void sc_putsfr(char * str, int n);
- void sc_putsflr(char * str, int n);
- void sc_putsflc(char * str, int n);
- void sc_putsfc(char * str, int n);
- void sc_putifr(int i, int n);
- void sc_putifc(int i, int n);
- void sc_movcur(int dcol, int drow);
- void sc_cursor(int flag);
- void sc_clip(int *col, int *row);
- int sc_getrow(void);
- int sc_getcol(void);
- void sc_setcur(int col, int row);
- void sc_init(int mode, char fcolr, char bcolr);
- void sc_color(char fcolr, char bcolr);
- void sc_font(struct FONT *fonts);
- void sc_attr(int atype);
- int sc_putc(char c);
- void sc_putsv(char * str);
- int sc_puts(char * str);
- void sc_putl(char * str);
- int sc_getch(int col, int row);
- void sc_putch(char c);
- void sc_eeol(void);
- void sc_clr(void);
- void sc_clrwin(int col1, int row1, int col2, int row2);
- void sc_scroll(int nrows, int col1, int row1, int col2, int row2);
- void sc_windo(int col1, int row1, int col2, int row2);
- char * sc_getwin(int x1, int y1, int x2, int y2);
- void sc_putwin(char * buff, int x1, int y1, int x2, int y2);
- void sc_home(void);
- void sc_winfull(void);
- void sc_winpush(void);
- void sc_winpop(void);
-
- /*
- * serial port functions
- */
-
- int si_init(int port, struct SI_PARMS *parms);
- int si_stat(int port);
- int si_out(int port, char c);
- int si_inp(int port);
- int si_putc(int port, char c);
- int si_getc(int port);
-
- /*
- * string functions
- */
-
- char * st_squ(char * str, char c);
- int st_ccmpu(char * s1, char * s2, int n);
- int st_ncmpi(char * s1, char * s2, int n);
- void st_ccat(char * s1, char * s2, int n);
- void st_bcpy(char * buff, char * str);
- char * st_instr(char * str2, char * str1);
- char * st_instri(char * str2, char * str1);
- char * st_inbuf(char * str, char * buff, int n);
- int st_patmai(char * str1, char * str2);
- int st_patma(char * str1, char * str2);
- char * st_bllz(char * str);
- char * st_zlbl(char * str);
- char * st_delc(char * str, char c);
- int st_wild(char * str);
- void st_tabr(char * str);
- void st_ptrs(char * buff, char * ptrs[], int cnt);
- int st_toi(char * str);
- long st_tol(char * str);
- float st_tof(char * str);
- char * st_upper(char * str);
- char * st_lower(char * str);
- void st_movr(char * str, int n);
- void st_movl(char * str, int n);
- void st_jusr(char * str, int n);
- void st_cntr(char * str, int n);
- char * st_subc(char * string, char c, char subc);
- char * st_left(char * str1, char * str2, short n);
- char * st_right(char * str1, char * str2, short n);
- char * st_substr(char * str1, char * str2, short pos, short n);
-
- /*
- * sytem functions
- */
-
- void sy_gtime(void);
- void sy_gdate(void);
- void sy_setintf(int vector, int (*function)());
- void sy_setintv(int vector, int *address);
- void sy_getintv(int vector, int *address);
- char * sy_ffdir(char * path, int attr);
- char * sy_fdir(void);
- void sy_getsys(void);
- int sy_isdrive(int driveno);
- int sy_indosf(int *ptr);
- void sy_beep(void);
- void sy_abort(void);
- int sy_doff(void *data);
- int sy_dseg(void *data);
- int sy_pseg(int (*function)());
- int sy_poff(int (*function)());
-
- /*
- * text functions
- */
-
- int tx_putf(FILE *fp);
- long tx_putfp(FILE *fp, long flpos);
- void tx_mesg(struct MESG *mesg);
- char * tx_putw(char * str);
- char * tx_putl(char * line);
- void tx_windo(int col1, int row1, int col2, int row2);
- int tx_menu(struct MENU *menu);
- char * tx_menust(struct MENU *menu);
- void tx_menuclr(struct MENU *menu);
- void tx_menudsp(struct MENU *menu);
- void tx_menuf(struct MENU *menu, short item, short attr);
- int tx_menusel(struct MENU *menu);
-
- /*
- * utility functions
- */
-
- void ut_crypt(char * buff, char key, int nbytes);
- void ut_gtod(void);
- void ut_gdate(void);
- void ut_gtime(void);
- long ut_datel(void);
- long ut_timel(void);
- void ut_dates(struct DATE *sdate);
- void ut_times(struct TIME *stime);
- void ut_sdatestr(char * str, struct DATE *sdate);
- void ut_stimestr(char * str, struct TIME *stime);
- void ut_ldates(struct DATE *sdate, long ldate);
- void ut_ldatestr(char * str, long ldate);
- void ut_ltimestr(char * str, long ltime);
- void ut_ltimes(struct TIME *stime, long ltime);
- void ut_hmtimestr(char * str, int hr, int mn);
- void ut_pause(int time);
- int ut_today(void);
- int ut_sday(struct DATE *sdate);
- char * ut_ldaystr(long ldate);
- int ut_sjday(struct DATE *sdate);
- char * ut_daystr(int day);
- char * ut_mostr(int mo);
- char * ut_thismo(void);
- char * ut_todaystr(void);
- void ut_dump(char * memptr, int nbytes);
- int ut_datecmp(struct DATE *sdate1, struct DATE *sdate2);
- int ut_datesub(struct DATE *sdate1, struct DATE *sdate2);
- void ut_dateadd(struct DATE *sdate1, struct DATE *sdate2);
- int ut_datedif(struct DATE *sdate1, struct DATE *sdate2);
- long ut_ldatedif(long ldate1, long ldate2);
- int ut_timecmp(struct TIME *time1, struct TIME *time2);
- void ut_timeadd(struct TIME *time1, struct TIME *time2);
- void ut_timesub(struct TIME *time1, struct TIME *time2);
- long ut_ldateadd(long ldate1, long ldate2);
- long ut_ldatesub(long ldate1, long ldate2);
- long ut_ltimeadd(long ltime1, long ltime2);
- long ut_ltimesub(long ltime1, long ltime2);
- int ut_stdates(struct DATE *sdate, char * str);
- int ut_sttimes(struct TIME *stime, char * str);
- long ut_stdatel(char * str);
- long ut_sttimel(char * str);
- int ut_isleap(int yr);
- int ut_push(int val);
- int ut_pop();
- char ut_xlateb(char byte, char * table);
- int ut_xtable(char * str, char * table[]);
- int ut_xlprox(char * str, char * table[]);
- char * ut_xlstr(char * str, char * table[]);
-