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