char mime_content_type[256];
char mime_disposition[256];
char relevant_partnum[256];
char mime_content_type[256];
char mime_disposition[256];
char relevant_partnum[256];
char msg4_content_type[256] = "";
char msg4_content_encoding[256] = "";
int msg4_content_length = 0;
struct vnote *vnote_from_body = NULL;
char msg4_content_type[256] = "";
char msg4_content_encoding[256] = "";
int msg4_content_length = 0;
struct vnote *vnote_from_body = NULL;
relevant_partnum[0] = '\0';
serv_printf("MSG4 %ld", msgnum); /* we need the mime headers */
Buf = NewStrBuf();
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, NULL) != 1) {
relevant_partnum[0] = '\0';
serv_printf("MSG4 %ld", msgnum); /* we need the mime headers */
Buf = NewStrBuf();
StrBuf_ServGetln(Buf);
if (GetServerStatus(Buf, NULL) != 1) {
- while ((StrBuf_ServGetln(Buf) >= 0) && !Done) {
- if ((StrLength(Buf) == 3) && !strcmp(ChrPtr(Buf), "000")) {
+ while ((StrBuf_ServGetln(Buf)>=0) && !Done) {
+ if ( (StrLength(Buf)==3) &&
+ !strcmp(ChrPtr(Buf), "000")) {
Data = NewStrBufPlain(NULL, msg4_content_length * 2);
if (msg4_content_length > 0) {
StrBuf_ServGetBLOBBuffered(Data, msg4_content_length);
Data = NewStrBufPlain(NULL, msg4_content_length * 2);
if (msg4_content_length > 0) {
StrBuf_ServGetBLOBBuffered(Data, msg4_content_length);
char buf[1024];
char *pch;
char boundary[256];
static int seq = 0;
snprintf(boundary, sizeof boundary, "Citadel--Multipart--%s--%04x--%04x",
char buf[1024];
char *pch;
char boundary[256];
static int seq = 0;
snprintf(boundary, sizeof boundary, "Citadel--Multipart--%s--%04x--%04x",
serv_puts("ENT0 1|||4");
serv_getln(buf, sizeof buf);
if (buf[0] == '4') {
/* Remember, serv_printf() appends an extra newline */
serv_puts("ENT0 1|||4");
serv_getln(buf, sizeof buf);
if (buf[0] == '4') {
/* Remember, serv_printf() appends an extra newline */
serv_printf("This is a multipart message in MIME format.\n");
serv_printf("--%s", boundary);
serv_printf("This is a multipart message in MIME format.\n");
serv_printf("--%s", boundary);
serv_printf("--%s", boundary);
serv_puts("Content-type: text/vnote");
serv_puts("Content-Transfer-Encoding: 7bit");
serv_printf("--%s", boundary);
serv_puts("Content-type: text/vnote");
serv_puts("Content-Transfer-Encoding: 7bit");
/* Was this request a delete operation? If so, nuke it... */
if (havebstr("deletenote")) {
if (!strcasecmp(bstr("deletenote"), "yes")) {
/* Was this request a delete operation? If so, nuke it... */
if (havebstr("deletenote")) {
if (!strcasecmp(bstr("deletenote"), "yes")) {
-int notes_LoadMsgFromServer(SharedMessageStatus * Stat, void **ViewSpecific, message_summary * Msg, int is_new, int i) {
+int notes_LoadMsgFromServer(SharedMessageStatus *Stat,
+ void **ViewSpecific,
+ message_summary* Msg,
+ int is_new,
+ int i)
+{
- StrBufAppendPrintf(WC->trailing_javascript,
- "document.write('L: ' + $('note-%s').style.left + '; ');", v->uid);
- StrBufAppendPrintf(WC->trailing_javascript,
- "document.write('T: ' + $('note-%s').style.top + '; ');", v->uid);
- StrBufAppendPrintf(WC->trailing_javascript,
- "document.write('W: ' + $('note-%s').style.width + '; ');", v->uid);
- StrBufAppendPrintf(WC->trailing_javascript,
- "document.write('H: ' + $('note-%s').style.height + '<br>');", v->uid);
- */
+ StrBufAppendPrintf(WC->trailing_javascript,
+ "document.write('L: ' + $('note-%s').style.left + '; ');", v->uid);
+ StrBufAppendPrintf(WC->trailing_javascript,
+ "document.write('T: ' + $('note-%s').style.top + '; ');", v->uid);
+ StrBufAppendPrintf(WC->trailing_javascript,
+ "document.write('W: ' + $('note-%s').style.width + '; ');", v->uid);
+ StrBufAppendPrintf(WC->trailing_javascript,
+ "document.write('H: ' + $('note-%s').style.height + '<br>');", v->uid);
+ */
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_left);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_left);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_top);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_top);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_width);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_width);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_height);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", v->pos_height);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", (v->pos_height / 16) - 5);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", (v->pos_height / 16) - 5);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", (v->pos_width / 9) - 1);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%d", (v->pos_width / 9) - 1);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%02X%02X%02X", v->color_red, v->color_green, v->color_blue);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendPrintf(Target, "%02X%02X%02X", v->color_red, v->color_green, v->color_blue);
}
- StrBufAppendPrintf(Target, "%02X%02X%02X", v->color_red / 2, v->color_green / 2, v->color_blue / 2);
+ StrBufAppendPrintf(Target, "%02X%02X%02X", v->color_red/2, v->color_green/2, v->color_blue/2);
- StrEscAppend(Target, NULL, v->body, 0, 0); /*TODO? */
+ StrEscAppend(Target, NULL, v->body, 0, 0); /*TODO?*/
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendBufPlain(Target, v->uid, -1, 0);
}
struct vnote *v = (struct vnote *) CTX(CTX_VNOTE);
StrBufAppendBufPlain(Target, v->uid, -1, 0);
}
-int notes_GetParamsGetServerCall(SharedMessageStatus * Stat,
- void **ViewSpecific, long oper, char *cmd, long len, char *filter, long flen) {
+int notes_GetParamsGetServerCall(SharedMessageStatus *Stat,
+ void **ViewSpecific,
+ long oper,
+ char *cmd,
+ long len,
+ char *filter,
+ long flen)
+{
memset(&TP, 0, sizeof(WCTemplputParams));
TP.Filter.ContextType = CTX_VNOTE;
TP.Context = v;
memset(&TP, 0, sizeof(WCTemplputParams));
TP.Filter.ContextType = CTX_VNOTE;
TP.Context = v;
- RegisterReadLoopHandlerset(VIEW_NOTES,
- notes_GetParamsGetServerCall,
- NULL, NULL, NULL, notes_LoadMsgFromServer, NULL, notes_Cleanup, NULL);
+ RegisterReadLoopHandlerset(
+ VIEW_NOTES,
+ notes_GetParamsGetServerCall,
+ NULL,
+ NULL,
+ NULL,
+ notes_LoadMsgFromServer,
+ NULL,
+ notes_Cleanup,
+ NULL);
WebcitAddUrlHandler(HKEY("add_new_note"), "", 0, add_new_note, 0);
WebcitAddUrlHandler(HKEY("ajax_update_note"), "", 0, ajax_update_note, 0);
WebcitAddUrlHandler(HKEY("add_new_note"), "", 0, add_new_note, 0);
WebcitAddUrlHandler(HKEY("ajax_update_note"), "", 0, ajax_update_note, 0);
RegisterNamespace("VNOTE:POS:HEIGHT2", 0, 0, tmpl_vcard_put_posheight2, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:WIDTH2", 0, 0, tmpl_vcard_put_width2, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:COLOR", 0, 0, tmpl_vcard_put_color, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:HEIGHT2", 0, 0, tmpl_vcard_put_posheight2, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:POS:WIDTH2", 0, 0, tmpl_vcard_put_width2, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:COLOR", 0, 0, tmpl_vcard_put_color, NULL, CTX_VNOTE);
- RegisterNamespace("VNOTE:BGCOLOR", 0, 0, tmpl_vcard_put_bgcolor, NULL, CTX_VNOTE);
+ RegisterNamespace("VNOTE:BGCOLOR", 0, 0,tmpl_vcard_put_bgcolor, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:MSG", 0, 1, tmpl_vcard_put_message, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:UID", 0, 0, tmpl_vcard_put_uid, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:MSG", 0, 1, tmpl_vcard_put_message, NULL, CTX_VNOTE);
RegisterNamespace("VNOTE:UID", 0, 0, tmpl_vcard_put_uid, NULL, CTX_VNOTE);