#include <setjmp.h>
#include <errno.h>
#include "citadel.h"
-
-void interr();
-void strprompt();
-void newprompt();
-void sttybbs();
-int inkey();
-int ka_wait();
-void serv_write();
-void extract();
-long finduser();
-int haschar();
-void progress();
-void citedit();
-int yesno();
-void nukedir();
+#include "routines2.h"
+
+void interr(int errnum);
+void strprompt(char *prompt, char *str, int len);
+void newprompt(char *prompt, char *str, int len);
+void sttybbs(int cmd);
+int inkey(void);
+int ka_wait(pid_t *kstatus);
+void serv_write(char *buf, int nbytes);
+void extract(char *dest, char *source, int parmnum);
+long finduser(int file, char *name);
+int haschar(char *st, int ch);
+void progress(long int curr, long int cmax);
+void citedit(FILE *fp, long int base_pos);
+int yesno(void);
+void nukedir(char *dirname);
extern char temp[];
extern char tempdir[];
extern int screenwidth;
-int eopen(name,mode)
-char *name;
-int mode; {
+int eopen(char *name, int mode)
+{
int ret;
ret = open(name,mode);
if (ret<0) {
}
-int room_prompt(qrflags) /* return proper room prompt character */
-int qrflags; {
+int room_prompt(int qrflags) /* return proper room prompt character */
+ {
int a;
a='>';
if (qrflags&QR_DIRECTORY) a=']';
return(a);
}
-void entregis() /* register with name and address */
+void entregis(void) /* register with name and address */
{
char buf[256];
printf("\n");
}
-void updatels() { /* make all messages old in current room */
+void updatels(void) { /* make all messages old in current room */
char buf[256];
serv_puts("SLRP HIGHEST");
serv_gets(buf);
if (buf[0]!='2') printf("%s\n",&buf[4]);
}
-void updatelsa() { /* only make messages old in this room that have been read */
+void updatelsa(void) { /* only make messages old in this room that have been read */
char buf[256];
sprintf(buf,"SLRP %ld",highest_msg_read);
serv_puts(buf);
/*
* client-based uploads (for users with their own clientware)
*/
-void cli_upload() {
+void cli_upload(void) {
char flnm[256];
char desc[151];
char buf[256];
/*
* protocol-based uploads (Xmodem, Ymodem, Zmodem)
*/
-void upload(c) /* c = upload mode */
-int c; {
+void upload(int c) /* c = upload mode */
+ {
char flnm[256];
char desc[151];
char buf[256];
/*
* validate a user
*/
-void val_user(user)
-char *user; {
+void val_user(char *user)
+{
int a,b;
char cmd[256];
char buf[256];
}
-void validate() { /* validate new users */
+void validate(void) { /* validate new users */
char cmd[256];
char buf[256];
int finished = 0;
} while(finished==0);
}
-void subshell() {
+void subshell(void) {
int a,b;
a=fork();
if (a==0) {
/*
* <.A>ide <F>ile <D>elete command
*/
-void deletefile() {
+void deletefile(void) {
char filename[32];
char cmd[256];
/*
* <.A>ide <F>ile <S>end command
*/
-void netsendfile() {
+void netsendfile(void) {
char filename[32],destsys[20],cmd[256];
newprompt("Filename: ",filename,31);
/*
* <.A>ide <F>ile <M>ove command
*/
-void movefile() {
+void movefile(void) {
char filename[64];
char newroom[20];
char cmd[256];
/*
* list of users who have filled out a bio
*/
-void list_bio() {
+void list_bio(void) {
char buf[256];
int pos = 1;
/*
* read bio
*/
-void read_bio() {
+void read_bio(void) {
char who[256];
char buf[256];