]> code.citadel.org Git - citadel.git/blobdiff - webcit/notes.c
* Header file adjustments to make it work on FreeBSD
[citadel.git] / webcit / notes.c
index 29527211452fe8fc1cf952c44df698971cb2fce5..10dfcff6aa49c931b34a6fee7ee07b627197f68a 100644 (file)
@@ -7,19 +7,32 @@
 
 #include <ctype.h>
 #include <stdlib.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdio.h>
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
+#endif
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
 #include <string.h>
 #include <pwd.h>
 #include <errno.h>
 #include <stdarg.h>
-#include <time.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
 #include "webserver.h"
 
@@ -30,17 +43,17 @@ void display_note(long msgnum) {
        int in_text = 0;
        int i;
 
-       wprintf("<IMG ALIGN=MIDDLE SRC=\"/static/note.gif\">\n");
+       wprintf("<IMG ALIGN=MIDDLE SRC=\"/static/storenotes_48x.gif\">\n");
 
        serv_printf("MSG0 %ld", msgnum);
-       serv_gets(buf);
+       serv_getln(buf, sizeof buf);
        if (buf[0] != '1') {
                wprintf("%s<br />\n", &buf[4]);
                return;
        }
 
        strcpy(notetext, "");
-       while (serv_gets(buf), strcmp(buf, "000")) {
+       while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
 
                /* Fill the buffer to at least 256 characters */
                if ( (in_text) && (strlen(notetext) < 256) ) {