home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / WWIV2.ZIP / FCNS.H < prev    next >
C/C++ Source or Header  |  1993-06-12  |  18KB  |  663 lines

  1. #ifndef _FCNS_H_
  2. #define _FCNS_H_
  3.  
  4. #include "vardec.h"
  5. #include "net.h"
  6.  
  7.  
  8. /* File: bbs.c */
  9.  
  10. int checkpw(void);
  11. void end_bbs(int lev);
  12. void sublist(void);
  13. void dirlist(void);
  14. void text_edit(void);
  15. void parse_email_info(char *s, unsigned short *un1, unsigned short *sy1);
  16. void send_email(void);
  17. void mainmenu(void);
  18. void dlmainmenu(void);
  19. int date_changed(void);
  20. void print_local_file(char *ss, char *ss1);
  21. void getcaller(void);
  22. void gotcaller(unsigned int ms, unsigned int cs);
  23. void main(int argc, char *argv[]);
  24.  
  25.  
  26. /* File: bbsutl.c */
  27.  
  28. void far *malloca(unsigned long nbytes);
  29. void stuff_in(char *s, char *s1, char *f1, char *f2, char *f3, char *f4, char *f5);
  30. void copy_line(char *s, char *b, long *ptr, long len);
  31. char *mmkey(int dl);
  32. void inli(char *s, char *rollover, int maxlen, int crend);
  33. int so(void);
  34. int cs(void);
  35. int lcs(void);
  36. void checka(int *abort, int *next);
  37. void pla(char *s, int *abort);
  38. char *ctim(double d);
  39. int sysop2(void);
  40. void reqchat(void);
  41. void yourinfo(void);
  42. void upload_post(void);
  43. int checkcomp(char *s);
  44. int check_ansi(void);
  45. int read_in_file(char *fn, messagerec *m, int maxary);
  46. int set_language_1(int n);
  47. int set_language(int n);
  48.  
  49.  
  50. /* File: bbsutl1.c */
  51.  
  52. int ok_local(void);
  53. int finduser1(char *sx);
  54. void sl1(int cmd,char *s);
  55. void sysopchar(char *s);
  56. void sysoplog(char *s);
  57. void ssm(unsigned int un, unsigned int sy, char *s);
  58. void rsm(int un, userrec *u);
  59. void show_chains(int *mapp, int *map);
  60. void run_chain(int cn);
  61. void do_chains(void);
  62.  
  63.  
  64. /* File: com.c */
  65.  
  66. int check_comport(int pn);
  67. void savel(char *cl, char *atr, char *xl, char *cc);
  68. void restorel(char *cl, char *atr, char *xl, char *cc);
  69. void ptime(void);
  70. void reprint(void);
  71. void print_help(int n);
  72. void setbeep(int i);
  73. void far interrupt async_isr(void);
  74. void outcomch(char ch);
  75. char peek1c(void);
  76. char get1c(void);
  77. int comhit(void);
  78. void dump(void);
  79. void set_baud(unsigned int rate);
  80. void initport(int port_num);
  81. void closeport(void);
  82. void dtr(int i);
  83. void rts(int i);
  84. int cdet(void);
  85. void checkhangup(void);
  86. void addto(char *s, int i);
  87. void makeansi(unsigned char attr, char *s, int forceit);
  88. void setfgc(int i);
  89. void setbgc(int i);
  90. void execute_ansi(void);
  91. void outchr(char c);
  92. void outstr(char *s);
  93. void nl(void);
  94. void nln(int n);
  95. void backspace(void);
  96. void setc(unsigned char ch);
  97. void pausescr(void);
  98. void npr(char *fmt, ...);
  99. void pl(char *s);
  100. void pln(int n);
  101. int kbhitb(void);
  102. int empty(void);
  103. void skey1(char *ch);
  104. char getchd(void);
  105. char getchd1(void);
  106. char inkey(void);
  107. void mpl(int i);
  108. char upcase(char ch);
  109. unsigned char getkey(void);
  110. void input1(char *s, int maxlen, int lc, int crend);
  111. void input(char *s, int len);
  112. void inputl(char *s, int len);
  113. int yn(void);
  114. int ny(void);
  115. char ynq(void);
  116. void ansic(int n);
  117. char onek(char *s);
  118. void prt(int i, char *s);
  119. void reset_colors(void);
  120. void goxy(int x, int y);
  121.  
  122.  
  123. /* File: conio.c */
  124.  
  125. void my_video_int(void);
  126. void set_global_handle(int i);
  127. void global_char(char ch);
  128. void set_x_only(int tf, char *fn, int ovwr);
  129. void movecsr(int x,int y);
  130. int wherex(void);
  131. int wherey(void);
  132. void lf(void);
  133. void cr(void);
  134. void clrscrb(void);
  135. void bs(void);
  136. void out1chx(unsigned char ch);
  137. void out1ch(unsigned char ch);
  138. void outs(char *s);
  139. void pr_wait(int i1);
  140. void set_protect(int l);
  141. void savescreen(screentype *s);
  142. void restorescreen(screentype far *s);
  143. void makewindow(int x, int y, int xlen, int ylen);
  144. void editline(char *s, int len, int status, int *returncode, char *ss);
  145. void val_cur_user(void);
  146. void temp_cmd(char *s, int ccc);
  147. char scan_to_char(unsigned char ch);
  148. void alt_key(unsigned char ch);
  149. void skey(char ch);
  150. void tleft(int x);
  151. void topscreen(void);
  152. void two_way_chat(char *s, char *rollover, int maxlen, int crend);
  153. void chat1(char *chatline, int two_way);
  154. void set_autoval(int n);
  155.  
  156.  
  157. /* File: connect1.c */
  158.  
  159. void zap_call_out_list(void);
  160. void read_call_out_list(void);
  161. void zap_bbs_list(void);
  162. void read_bbs_list(void);
  163. void read_bbs_list_index(void);
  164. int system_index(unsigned int ts);
  165. int valid_system(unsigned int ts);
  166. net_system_list_rec *next_system(unsigned int ts);
  167. void zap_contacts(void);
  168. void read_contacts(void);
  169. void set_net_num(int n);
  170.  
  171.  
  172. /* File: extrn.c */
  173.  
  174. unsigned char getkeyext(void);
  175. void cd_to(char *s);
  176. void get_dir(char *s, int be);
  177. void initporte(int port_num);
  178. int do_it(char *cl);
  179. int do_remote(char *s, int ccc);
  180. void checka1(void);
  181. void checka2(void);
  182. int run_external(char *s);
  183. int run_external_ul(char *s);
  184. int run_external1(char *s);
  185. void outdosstr(char *s);
  186. int do_external(char *s, int enab);
  187. int full_external(char *s, int ctc, int ccc);
  188. char *create_chain_file(char *fn);
  189.  
  190.  
  191. /* File: modem.c */
  192.  
  193. void pr1(unsigned char *s);
  194. void get_modem_line(char *s, double d, int allowa);
  195. void do_result(result_info *ri);
  196. void process_full_result(char *s);
  197. int mode_switch(double d, int allowa);
  198. void holdphone(int d);
  199. void imodem(int x);
  200. void answer_phone(void);
  201.  
  202.  
  203. /* File: msgbase.c */
  204.  
  205. void describe_area_code(int areacode, char *description);
  206. void setorigin(int sysnum, int usernum);
  207. int okfsed(void);
  208. void remove_link(messagerec *m1, char *aux);
  209. int open_file(char *fn);
  210. void set_gat_section(int f, int section);
  211. void save_gat(int f);
  212. void savefile(char *b, long l1, messagerec *m1, char *aux);
  213. char *readfile(messagerec *m1, char *aux, long *l);
  214. void change_storage(messagerec *oldm, char *olda, messagerec *newm, char *newa);
  215. void load_workspace(char *fnx, int no_edit);
  216. void osan(char *s, int *abort, int *next);
  217. void addline(char *b, char *s, long *ll);
  218. void stuff(char *s, char *old, char *new);
  219. void inmsg(messagerec *m1, char *title, int *anony, int needtitle, char *aux, int fsed, char *dest, int flags);
  220. int forwardm(unsigned short *u, unsigned short *s);
  221. void sendout_email(char *title, messagerec *msg, int anony, unsigned un, unsigned sy, int an, unsigned uf, unsigned sf, int fwd, int fnn);
  222. int ok_to_mail(unsigned un, unsigned sy, int forceit);
  223. void email(unsigned short un, unsigned short sy, int forceit, int anony);
  224. void imail(unsigned short u, unsigned short s);
  225. void iscan(int b);
  226. void iscan_hash(int b);
  227. void savebase(void);
  228. void plan(char *s, int *abort, int *next);
  229. void read_message1(messagerec *m1, char an, int readit, int *next, char *fn);
  230. int printfile(char *fn);
  231. void read_message(int n, int *next, int *val);
  232. void lineadd(messagerec *m1, char *sx, char *aux);
  233. void delete(int mn);
  234.  
  235.  
  236. /* File: msgbase1.c */
  237.  
  238. void send_net_post(postrec *p, char *extra, int subnum);
  239. void post(void);
  240. void extract_out(char *b, long len, char *title);
  241. void grab_user_name(messagerec *m, char *fn);
  242. void scan(int msgnum, int optype, int *nextsub);
  243. void qscan(int bn, int *ns);
  244. void nscan(int ss);
  245. void scan2(void);
  246. void printmenu(int i);
  247. void delmail(int f, int loc);
  248. void purgemail(int f,int *mloc,int mw,int *curmail, mailrec *m1, slrec *ss);
  249. void readmail(void);
  250. void remove_post(void);
  251. int external_edit(char *fn1, char *direc, int ednum, int numlines, char *dest, char *title, int flags);
  252. void grab_quotes(messagerec *m, char *aux);
  253.  
  254.  
  255. /* File: shrink.c */
  256.  
  257. int restore_data(char *s);
  258. void save_state(char *s, int state,int ctc);
  259. char *findit(char *cmd,char *ext);
  260. void do_it_1(char *cl);
  261. void shrink_out(char *command, int state, int intercept,int ctc,int ccc);
  262.  
  263.  
  264. /* File: sr.c */
  265.  
  266. char *stripfn(char *fn);
  267. void stripfn1(char *fn);
  268. void calc_CRC(unsigned char b);
  269. char gettimeout(double d, int *abort);
  270. int extern_prot(int pn, char *fn1, int sending);
  271. int ok_prot(int pn, xfertype xt);
  272. char *prot_name(int pn);
  273. int get_protocol(xfertype xt);
  274. void ascii_send(char *fn, int *sent, double *percent);
  275. void maybe_internal(char *fn, int *xferred, double *percent, char ft, char *ftp, int send, int prot);
  276. void send_file(char *fn, int *sent, int *abort, char ft, char *sfn, int dn, long fs);
  277. void receive_file(char *fn, int *received, char *ft, char *sfn, int dn);
  278. char end_batch1(void);
  279. void endbatch(void);
  280.  
  281.  
  282. /* File: utility.c */
  283.  
  284. void reset_act_sl(void);
  285. void remove_from_temp(char *fn, char *dir, int po);
  286. void check_event(void);
  287. void run_event(void);
  288. double freek(int dr);
  289. unsigned char years_old(unsigned char m, unsigned char d, unsigned char y);
  290. void itimer(void);
  291. double timer(void);
  292. long timer1(void);
  293. int sysop1(void);
  294. int okansi(void);
  295. void frequent_init(void);
  296. void fix_user_rec(userrec *u);
  297. void close_user(void);
  298. void open_user(void);
  299. int number_userrecs(void);
  300. void read_user(unsigned int un, userrec *u);
  301. void write_user(unsigned int un, userrec *u);
  302. int open_qscn(void);
  303. void close_qscn(void);
  304. void read_qscn(unsigned int un, unsigned long *qscn, int stayopen);
  305. void write_qscn(unsigned int un, unsigned long *qscn, int stayopen);
  306. void save_status(void);
  307. double ratio(void);
  308. double post_ratio(void);
  309. char *nam(userrec *u1, unsigned int un);
  310. char *nam1(userrec *u1, unsigned int un, unsigned int sy);
  311. double nsl(void);
  312. char *date(void);
  313. char *times(void);
  314. unsigned int finduser(char *s);
  315. void changedsl(void);
  316. void isr(int un, char *name);
  317. void dsr(char *name);
  318. void wait(double d);
  319. void wait1(long l);
  320. double freek1(char *s);
  321. int exist(char *s);
  322. void add_ass(int i, char *ss);
  323. int find_interrupt(void);
  324. void send_net(net_header_rec *nh, unsigned int *list, char *text, char *byname);
  325. unsigned char dow(void);
  326. void detect_multitask(void);
  327. void giveup_timeslice(void);
  328. void begin_crit(void);
  329. void end_crit(void);
  330.  
  331.  
  332. /* File: xfer.c */
  333.  
  334. int check_batch_queue(char *fn);
  335. int check_ul_event(int dn, uploadsrec *u);
  336. void finddevs(char (*devs)[9], int *count);
  337. void find_devices(void);
  338. int okfn(char *s);
  339. void print_devices(void);
  340. char *make_abs_cmd(char *out);
  341. void get_arc_cmd(char *out, char *arcfn, int cmd, char *ofn);
  342. int list_arc_out(char *fn, char *dir);
  343. int ratio_ok(void);
  344. int dcs(void);
  345. void dliscan1(int dn);
  346. void dliscan_hash(int dn);
  347. void dliscan(void);
  348. void closedl(void);
  349. void add_extended_description(char *fn, char *desc);
  350. void delete_extended_description(char *fn);
  351. char *read_extended_description(char *fn);
  352. void print_extended(char *fn, int *abort, unsigned char numlist, int indent);
  353. void modify_extended_description(char **sss, char *dest, char *title);
  354. void align(char *s);
  355. int compare(char *s1, char *s2);
  356. void printinfo(uploadsrec *u, int *abort);
  357. void printtitle(int *abort);
  358. void file_mask(char *s);
  359. void listfiles(void);
  360. void nscandir(int d, int *abort,int title);
  361. void nscanall(void);
  362. void searchall(void);
  363. int recno(char *s);
  364. int nrecno(char *s,int i1);
  365. int printfileinfo(uploadsrec *u, int dn);
  366. void upload(int dn);
  367. long date_to_daten(char *datet);
  368. int try_to_download(char *s, int dn,int title);
  369. void download(void);
  370. void setldate(void);
  371. void finddescription(void);
  372. void arc_l(void);
  373. void yourinfodl(void);
  374. void l_config_nscan(void);
  375. void config_nscan(void);
  376. void xfer_defaults(void);
  377. void removefile(void);
  378.  
  379.  
  380. /* File: strings.c */
  381.  
  382. int set_strings_fn(int filen, char *dir, char *fn, int allowwrite);
  383. void put_string(int filen, int n, char *s);
  384. int cachestat(void);
  385. char *get_stringx(int filen, int n);
  386. char *get_string(int n);
  387. int num_strings(int filen);
  388. char *getrandomstring(int filen);
  389. void close_strfiles(void);
  390.  
  391.  
  392. /* File: batch.c */
  393.  
  394. void listbatch(void);
  395. void delbatch(int i);
  396. void downloaded(char *fn, long cps);
  397. void didnt_upload(int ind);
  398. int try_to_ul(char *fn);
  399. void uploaded(char *fn, long cps);
  400. void ymbatchdl(int had);
  401. void handle_dszline(char *l);
  402. double ratio1(long a);
  403. void make_ul_batch_list(char *listfn);
  404. void make_dl_batch_list(char *listfn);
  405. void run_cmd(char *cmdln, char *downlist, char *uplist, char *dl, int had);
  406. void process_dszlog(void);
  407. void dszbatchdl(int had, char *cmdln, char *desc);
  408. void dszbatchul(int had, char *cmdln, char *desc);
  409. void bibatch(int had, char *cmdln, char *desc);
  410. void batchdl(void);
  411.  
  412.  
  413. /* File: chnedit.c */
  414.  
  415. void chaindata(int n, char *s);
  416. void showchains(void);
  417. void modify_chain(int n);
  418. void insert_chain(int n);
  419. void delete_chain(int n);
  420. void chainedit(void);
  421.  
  422.  
  423. /* File: defaults.c */
  424.  
  425. void select_editor(void);
  426. void print_cur_stat(void);
  427. char *cn(char c);
  428. char *describe(char col);
  429. void color_list(void);
  430. void change_colors(void);
  431. void l_config_qscan(void);
  432. void config_qscan(void);
  433. void list_macro(unsigned char *s);
  434. void make_macros(void);
  435. void input_pw1(void);
  436. void modify_mailbox(void);
  437. void optional_lines(void);
  438. void enter_regnum(void);
  439. void defaults(void);
  440.  
  441.  
  442. /* File: diredit.c */
  443.  
  444. void dirdata(int n, char *s);
  445. void showdirs(void);
  446. void modify_dir(int n);
  447. void insert_dir(int n);
  448. void delete_dir(int n);
  449. void dlboardedit(void);
  450.  
  451.  
  452. /* File: gfiles.c */
  453.  
  454. char *get_file(char *fn, long *len);
  455. gfilerec *read_sec(int sn, int *nf);
  456. void list_sec(int *map, int nmap);
  457. void list_gfiles(gfilerec *g, int nf);
  458. void gfile_sec(int sn);
  459. void gfiles(void);
  460.  
  461.  
  462. /* File: gfledit.c */
  463.  
  464. void gfiledata(int n, char *s);
  465. void showsec(void);
  466. int exist_dir(char *s);
  467. void modify_sec(int n);
  468. void insert_sec(int n);
  469. void delete_sec(int n);
  470. void gfileedit(void);
  471. int fill_sec(int sn);
  472.  
  473.  
  474. /* File: lilo.c */
  475.  
  476. void getuser(void);
  477. void logon(void);
  478. void logoff(void);
  479.  
  480.  
  481. /* File: misccmd.c */
  482.  
  483. void read_automessage(void);
  484. void write_automessage1(void);
  485. void write_automessage(void);
  486. void bbslist(void);
  487. void kill_old_email(void);
  488. void list_users(void);
  489. void print_quest(int f, int mapp, int map[21]);
  490. int print_question(int f, int i, int ii);
  491. void vote_question(int f, int i, int ii);
  492. void vote(void);
  493.  
  494.  
  495. /* File: multmail.c */
  496.  
  497. void multimail(int *un, int numu);
  498. int oneuser(void);
  499. void add_list(int *un, int *numu, int maxu, int allowdup);
  500. void slash_e(void);
  501.  
  502.  
  503. /* File: netsup.c */
  504.  
  505. int run_external1_x(char *cl);
  506. void shrink_out_x(char *cl);
  507. void checkup(struct ftime *f1, struct ftime *f2, int *tf);
  508. int checkup2(struct ftime *f, char *x);
  509. int check_bbsdata(void);
  510. void cleanup_net(void);
  511. void do_callout(int sn);
  512. int ok_to_call(int i);
  513. void fixup_long(long *f, long l);
  514. void attempt_callout(void);
  515. void force_callout(void);
  516. void print_pending_list(void);
  517. void gate_msg(net_header_rec *nh, char *text, unsigned short nn, char *byname, unsigned int *list, unsigned short fnn);
  518.  
  519.  
  520. /* File: newuser.c */
  521.  
  522. int check_name(char *nn);
  523. void input_name(void);
  524. void input_realname(void);
  525. void input_callsign(void);
  526. int valid_phone(char *phone);
  527. void input_phone(void);
  528. void input_street(void);
  529. void input_city(void);
  530. void input_state(void);
  531. void input_country(void);
  532. void input_zipcode(void);
  533. void input_dataphone(void);
  534. void input_sex(void);
  535. void input_age(userrec *u);
  536. void input_comptype(void);
  537. void input_screensize(void);
  538. void input_pw(void);
  539. void input_ansistat(void);
  540. void newuser(void);
  541.  
  542.  
  543. /* File: srrcv.c */
  544.  
  545. char modemkey(int *tout);
  546. int receive_block(char *b, unsigned char *bln, int ucrc);
  547. void xymodem_receive(char *fn, char *ft, int *received, int ucrc);
  548.  
  549.  
  550. /* File: srsend.c */
  551.  
  552. void send_block(char *b, int type, int ucrc, char bn);
  553. char send_b(int f, long pos, int type, char bn, int *ucrc, char *fn, int *terr, int *abort);
  554. int okstart(int *ucrc, int *abort);
  555. void xymodem_send(char *fn, int *sent, double *percent, char ft, int ucrc, int ym, int ymb);
  556.  
  557.  
  558. /* File: subedit.c */
  559.  
  560. void save_subs(void);
  561. void boarddata(int n, char *s);
  562. void showsubs(void);
  563. void modify_sub(int n);
  564. void insert_sub(int n);
  565. void delete_sub(int n);
  566. void boardedit(void);
  567.  
  568.  
  569. /* File: subreq.c */
  570.  
  571. void sub_req(int main_type, int minor_type, int tosys, char *extra);
  572. int find_hostfor(char *type, unsigned short *ui, char *desc, unsigned short *opt);
  573. void sub_xtr_del(int n, int nn, int f);
  574. void sub_xtr_add(int n, int nn);
  575.  
  576.  
  577. /* File: sysopf.c */
  578.  
  579. void isr1(int un, char *name);
  580. void reset_files(void);
  581. void get_status(void);
  582. void prstatus(void);
  583. void valuser(int un);
  584. void print_net_listing(unsigned int ss);
  585. void read_new_stuff(void);
  586. void mailr(void);
  587. void chuser(void);
  588. void zlog(void);
  589. void beginday(void);
  590.  
  591.  
  592. /* File: tedit.c */
  593.  
  594. struct line *read_file(char *fn, int *numlines);
  595. void kill_file(struct line *topline);
  596. void save_file(char *fn, struct line *topline);
  597. int printl(int n, struct line *l);
  598. void tedit(char *fn);
  599.  
  600.  
  601. /* File: uedit.c */
  602.  
  603. void deluser(int un);
  604. void print_data(int un, userrec *u, int lng, int cls);
  605. int matchuser(int un);
  606. int match_user(userrec *u);
  607. void changeopt(void);
  608. void uedit(int usern, int other);
  609.  
  610.  
  611. /* File: voteedit.c */
  612.  
  613. void print_quests(int f);
  614. void set_question(int f, int ii);
  615. void ivotes(void);
  616. void voteprint(void);
  617.  
  618.  
  619. /* File: xferovl.c */
  620.  
  621. void move_file(void);
  622. int comparedl(uploadsrec *x, uploadsrec *y, int type);
  623. void quicksort(int l,int r,int type);
  624. void sortdir(int dn, int type);
  625. void sort_all(int type);
  626. void rename_file(void);
  627. int upload_file(char *fn, int dn, char *desc);
  628. int maybe_upload(char *fn, int dn, char *desc);
  629. void upload_files(char *fn, int dn, int type);
  630. int uploadall(int dn);
  631.  
  632.  
  633. /* File: xfertmp.c */
  634.  
  635. long bad_filename(char *fn);
  636. int check_for_files_arc(char *fn);
  637. int check_for_files_zip(char *fn);
  638. int check_for_files_lzh(char *fn);
  639. int check_for_files_arj(char *fn);
  640. int check_for_files(char *fn);
  641. void download_temp_arc(char *fn, int xfer);
  642. void add_arc(char *arc, char *fn, int dos);
  643. void add_temp_arc(void);
  644. void del_temp(void);
  645. void list_temp_dir(void);
  646. void temp_extract(void);
  647. void list_temp_text(void);
  648. void list_temp_arc(void);
  649. void temporary_stuff(void);
  650.  
  651.  
  652. /* File: xinit.c */
  653.  
  654. void far *mallocx(unsigned long l, char *where);
  655. void init(void);
  656.  
  657.  
  658. /* File: subxtr.c */
  659.  
  660. int read_subs_xtr(int max_subs, int num_subs, subboardrec *subboards);
  661.  
  662. #endif
  663.