#define REV_LEVEL 922 // This version
#define REV_MIN 591 // Oldest compatible database
#define EXPORT_REV_MIN 760 // Oldest compatible export files
-#define LIBCITADEL_MIN 920 // Minimum required version of libcitadel
+#define LIBCITADEL_MIN 921 // Minimum required version of libcitadel
#define SERVER_TYPE 0 // zero for stock Citadel; other developers please
// obtain SERVER_TYPE codes for your implementations
}
if (!strcasecmp(cbtype, "text/html")) {
- ptr = html_to_ascii(content, length, 80, 0);
+ ptr = html_to_ascii(content, length, 80);
wlen = strlen(ptr);
client_write(ptr, wlen);
if ((wlen > 0) && (ptr[wlen-1] != '\n')) {
/*
* Functions which handle translation between HTML and plain text
- * Copyright (c) 2000-2010 by the citadel.org team
+ * Copyright (c) 2000-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* inputmsg = pointer to raw HTML message
* screenwidth = desired output screenwidth
- * do_citaformat = set to 1 to indent newlines with spaces
*/
-char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth, int do_citaformat) {
+char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth) {
char inbuf[SIZ];
int inbuf_len = 0;
char outbuf[SIZ];
strncpy(&outptr[output_len], outbuf, i+1);
output_len += (i+1);
- if (do_citaformat) {
- strcpy(&outptr[output_len], " ");
- ++output_len;
- }
-
strcpy(outbuf, &outbuf[i+1]);
i = 0;
did_out = 1;
output_len += rb;
strcpy(&outptr[output_len], nl);
output_len += strlen(nl);
- if (do_citaformat) {
- strcpy(&outptr[output_len], " ");
- ++output_len;
- }
strcpy(outbuf, &outbuf[rb+1]);
} else {
strncpy(&outptr[output_len], outbuf,
output_len += (screenwidth-2);
strcpy(&outptr[output_len], nl);
output_len += strlen(nl);
- if (do_citaformat) {
- strcpy(&outptr[output_len], " ");
- ++output_len;
- }
strcpy(outbuf, &outbuf[screenwidth-2]);
}
}
#include <sys/types.h>
#include <netinet/in.h>
-#define LIBCITADEL_VERSION_NUMBER 920
+#define LIBCITADEL_VERSION_NUMBER 921
/*
* Here's a bunch of stupid magic to make the MIME parser portable.
int is_msg_in_mset(const char *mset, long msgnum);
int pattern2(char *search, char *patn);
void stripltlen(char *, int *);
-char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth, int do_citaformat);
+char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth);
void LoadEntityList(char *FileName);
StrBufTCP_read_line(Source, &fdin, 0, &Err);
printf("the source:>%s<\n", ChrPtr(Source));
- Target = html_to_ascii(ChrPtr(Source), StrLength(Source), 80, 0);
+ Target = html_to_ascii(ChrPtr(Source), StrLength(Source), 80);
printf("the target:>%s<\n", Target);
FlushStrBuf(Source);
* of the client screen.
*/
if (!strcasecmp(message->content_type, "text/html")) {
- converted_text = html_to_ascii(message->text, 0, screenwidth, 0);
+ converted_text = html_to_ascii(message->text, 0, screenwidth);
if (converted_text != NULL) {
free(message->text);
message->text = converted_text;
serv_puts("Content-type: text/plain; charset=utf-8");
serv_puts("Content-Transfer-Encoding: quoted-printable");
serv_puts("");
- txtmail = html_to_ascii(bstr("msgtext"), 0, 80, 0);
+ txtmail = html_to_ascii(bstr("msgtext"), 0, 80);
Buf = NewStrBufPlain(txtmail, -1);
free(txtmail);
#define CLIENT_ID 4
#define CLIENT_VERSION 921 /* This version of WebCit */
#define MINIMUM_CIT_VERSION 920 /* Minimum required version of Citadel server */
-#define LIBCITADEL_MIN 920 /* Minimum required version of libcitadel */
+#define LIBCITADEL_MIN 921 /* Minimum required version of libcitadel */
#define DEFAULT_HOST "localhost" /* Default Citadel server */
#define DEFAULT_PORT "504"
#define TARGET "webcit01" /* Window target for inline URL's */