X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Froutines.c;h=9390e36bf6043a1d2887d4e0182b33dafc93f80b;hb=ae822088bca5cce3d6c3ef7f6d312a6d5de7a77c;hp=d7a2cf0f234af54b39682d8de835011adc8fa6c8;hpb=318aa2adec10d6291ca684f3362c70ab89796cc3;p=citadel.git diff --git a/citadel/routines.c b/citadel/routines.c index d7a2cf0f2..9390e36bf 100644 --- a/citadel/routines.c +++ b/citadel/routines.c @@ -18,18 +18,19 @@ #define ROUTINES_C #include "citadel.h" - -char inkey(); -void sttybbs(); -void newprompt(); -void val_user(); -int intprompt(); -void formout(); -void logoff(); -void set_keepalives(); -void strprompt(); -void newprompt(); -void color(); +#include "routines.h" + +char inkey(void); +void sttybbs(int cmd); +void newprompt(char *prompt, char *str, int len); +void val_user(char *user); +int intprompt(char *prompt, int ival, int imin, int imax); +void formout(char *name); +void logoff(int code); +void set_keepalives(int s); +void strprompt(char *prompt, char *str, int len); +void newprompt(char *prompt, char *str, int len); +void color(int colornum); #define IFAIDE if(axlevel>=6) #define IFNAIDE if (axlevel<6) @@ -40,9 +41,8 @@ extern char sigcaught; extern struct CtdlServInfo serv_info; extern char rc_floor_mode; -int struncmp(lstr,rstr,len) -char lstr[],rstr[]; -int len; { +int struncmp(char *lstr, char *rstr, int len) +{ int pos = 0; char lc,rc; while (pos=(height-1)) { set_keepalives(KA_NO); @@ -365,8 +356,7 @@ int pagin; { } -void strproc(string) -char string[]; +void strproc(char *string) { int a; @@ -403,8 +393,8 @@ char string[]; } -int hash(str) -char str[]; { +int hash(char *str) +{ int h = 0; int i; @@ -412,9 +402,8 @@ char str[]; { return(h); } -long finduser(file,name) -int file; -char *name; { +long finduser(int file, char *name) +{ FILE *fp; int uh,fh; long pp=0L; @@ -433,8 +422,8 @@ char *name; { } -int alias(name) /* process alias and routing info for mail */ -char name[]; { +int alias(char *name) /* process alias and routing info for mail */ + { FILE *fp; int a,b; char aaa[300],bbb[300]; @@ -519,8 +508,8 @@ GETSN: do { /* * replacement strerror() for systems that don't have it */ -char *strerror(e) -int e; { +char *strerror(int e) +{ static char buf[32]; sprintf(buf,"errno = %d",e); @@ -529,9 +518,8 @@ int e; { #endif -void progress(curr,cmax) -long curr; -long cmax; { +void progress(long int curr, long int cmax) +{ static long dots_printed; long a; @@ -560,8 +548,8 @@ long cmax; { * NOT the same locate_host() in locate_host.c. This one just does a * 'who am i' to try to discover where the user is... */ -void locate_host(hbuf) -char hbuf[]; { +void locate_host(char *hbuf) +{ char buf[256]; FILE *who; int a,b; @@ -624,8 +612,8 @@ void misc_server_cmd(char *cmd) { /* * compute the checksum of a file */ -int file_checksum(filename) -char *filename; { +int file_checksum(char *filename) +{ int cksum = 0; int ch; FILE *fp; @@ -647,8 +635,8 @@ char *filename; { /* * nuke a directory and its contents */ -int nukedir(dirname) -char *dirname; { +int nukedir(char *dirname) +{ DIR *dp; struct dirent *d; char filename[256];