]> code.citadel.org Git - citadel.git/blobdiff - citadel/routines2.c
Create some directories to hold the source files for the utility
[citadel.git] / citadel / routines2.c
index 9896697a6d1647bf192addc5d3cbb6c4b169b120..3fbff5f3d136d85b242d81f9fef7c5eec820564f 100644 (file)
@@ -30,6 +30,7 @@
 #include <pwd.h>
 #include <errno.h>
 #include <stdarg.h>
+#include <libcitadel.h>
 #include "sysdep.h"
 #include "citadel.h"
 #include "citadel_ipc.h"
@@ -37,7 +38,6 @@
 #include "routines2.h"
 #include "routines.h"
 #include "commands.h"
-#include "tools.h"
 #include "messages.h"
 #ifndef HAVE_SNPRINTF
 #include "snprintf.h"
@@ -316,6 +316,7 @@ void upload(CtdlIPC *ipc, int c)
        int a, b;
        FILE *fp, *lsfp;
        int r;
+       int rv;
 
        if ((room_flags & QR_UPLOAD) == 0) {
                scr_printf("*** You cannot upload to this room.\n");
@@ -342,7 +343,7 @@ void upload(CtdlIPC *ipc, int c)
        /* now do the transfer ... in a separate process */
        xfer_pid = fork();
        if (xfer_pid == 0) {
-               chdir(tempdir);
+               rv = chdir(tempdir);
                switch (c) {
                case 0:
                        stty_ctdl(0);
@@ -431,7 +432,7 @@ int val_user(CtdlIPC *ipc, char *user, int do_validate)
                        if (a == 1)
                                scr_printf("User #%s - %s  ", buf, cmd);
                        if (a == 2)
-                               scr_printf("PW: %s\n", buf);
+                               scr_printf("PW: %s\n", (IsEmptyStr(buf) ? "<NOT SET>" : "<SET>") );
                        if (a == 3)
                                scr_printf("%s\n", buf);
                        if (a == 4)
@@ -548,21 +549,6 @@ void deletefile(CtdlIPC *ipc)
        err_printf("%s\n", buf);
 }
 
-/*
- * <.A>ide <F>ile <S>end command
- */
-void netsendfile(CtdlIPC *ipc)
-{
-       char filename[32], destsys[20], buf[256];
-
-       newprompt("Filename: ", filename, 31);
-       if (IsEmptyStr(filename))
-               return;
-       newprompt("System to send to: ", destsys, 19);
-       CtdlIPCNetSendFile(ipc, filename, destsys, buf);
-       err_printf("%s\n", buf);
-       return;
-}
 
 /*
  * <.A>ide <F>ile <M>ove command