4 * Functions which handle "sticky notes"
11 void display_note(long msgnum) {
14 char display_notetext[SIZ];
18 wprintf("<IMG ALIGN=MIDDLE src=\"static/storenotes_48x.gif\">\n");
20 serv_printf("MSG0 %ld", msgnum);
21 serv_getln(buf, sizeof buf);
23 wprintf("%s<br />\n", &buf[4]);
28 while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
30 /* Fill the buffer to at least 256 characters */
31 if ( (in_text) && (strlen(notetext) < 256) ) {
32 strcat(notetext, buf);
35 if ( (!in_text) && (!strcasecmp(buf, "text")) ) {
40 /* Now sanitize the buffer, and shorten it to just a small snippet */
41 for (i=0; i<strlen(notetext); ++i) {
42 if (isspace(notetext[i])) notetext[i] = ' ';
44 strcpy(¬etext[72], "...");
46 /* Make it HTML-happy and print it. */
47 stresc(display_notetext, notetext, 1, 1);
48 wprintf("%s<br />\n", display_notetext);