$Log$
+ Revision 608.17 2003/08/05 03:06:58 ajc
+ * Added a README.txt file because some Joker kept bugging me about it
+ * Reloaded the code that extracts embedded URL's to a place where it'll
+ get picked up on *every* message, not just the old variformat stuff
+
Revision 608.16 2003/08/03 17:51:52 ajc
* Clear out all masqueraded wholist fields when logging out, in case another
user logs in without reconnecting.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
--- /dev/null
+
+ * A full set of documentation may be found in the docs/ directory.
+
+ * The condensed version:
+
+ 1. Create a user on your system under which to run Citadel
+ 2. Install a supported version of Berkeley DB
+ 3. ./configure && make && make install
+ 4. Run the "setup" program
+
+ * Keep in mind that there is a FAQ at http://www.citadel.org
+
int rc_remember_passwords;
int rc_ansi_color;
int rc_color_use_bg;
-int num_urls = 0;
int rc_prompt_control = 0;
time_t rc_idle_threshold = (time_t)900;
-char urls[MAXURLS][SIZ];
char rc_url_cmd[SIZ];
char rc_gotmail_cmd[SIZ];
int column = 0; /* Current column */
size_t i; /* Generic counter */
- num_urls = 0; /* Start with a clean slate of embedded URL's */
-
/* Space for a single word, which can be at most screenwidth */
word = (char *)calloc(1, width);
if (!word) {
if (e[i] == '\t' || e[i] == '\f' || e[i] == '\v')
e[i] = ' ';
- /*
- * Check for and copy URLs
- * We will get the entire URL even if it's longer than the
- * screen width, as long as the server didn't break it up
- */
- if (!strncasecmp(e, "http://", 7) ||
- !strncasecmp(e, "ftp://", 6)) {
- int j;
-
- strncpy(urls[num_urls], e, i);
- urls[num_urls][i] = 0;
- for (j = 0; j < strlen(e); j++) {
- char c;
-
- c = urls[num_urls][j];
- if (c == '>' || c == '\"' || c == ')' ||
- c == ' ' || c == '\n') {
- urls[num_urls][j] = 0;
- break;
- }
- }
- num_urls++;
- }
-
/* Break up really long words */
/* TODO: auto-hyphenation someday? */
if (i >= width)
#define COLOR_POP 17 /* Restore saved color */
#define ORIGINAL_PAIR -1 /* Default terminal colors */
-#define MAXURLS 50 /* Max embedded URL's per message */
-
/*
* declarations
*/
-extern int num_urls;
-extern char urls[MAXURLS][SIZ];
extern char rc_url_cmd[SIZ];
extern char rc_gotmail_cmd[SIZ];
extern int lines_printed;
extern int rc_force_mail_prompts;
extern int editor_pid;
extern CtdlIPC *ipc_for_signal_handlers; /* KLUDGE cover your eyes */
+int num_urls = 0;
+char urls[MAXURLS][SIZ];
void ka_sigcatch(int signum)
{
char *converted_text = NULL;
char *lineptr;
char *nextline;
+ char *searchptr;
+ int i;
+ char ch;
int linelen;
int final_line_is_blank = 0;
format_type = 1;
}
+ /* Extract URL's */
+ num_urls = 0; /* Start with a clean slate */
+ searchptr = message->text;
+ while (searchptr != NULL) {
+ searchptr = strstr(searchptr, "http://");
+ if (searchptr != NULL) {
+ safestrncpy(urls[num_urls], searchptr, sizeof(urls[num_urls]));
+ for (i = 0; i < strlen(urls[num_urls]); i++) {
+ ch = urls[num_urls][i];
+ if (ch == '>' || ch == '\"' || ch == ')' ||
+ ch == ' ' || ch == '\n') {
+ urls[num_urls][i] = 0;
+ break;
+ }
+ }
+ num_urls++;
+ ++searchptr;
+ }
+ }
+
/*
* Here we go
*/
char buf[SIZ];
int founda = 0;
- snprintf(buf, sizeof buf, "MSG0 %ld|1", msg_arr[finda]); /* read the header so we can get 'from=' */
+ /* read the header so we can get 'from=' */
+ snprintf(buf, sizeof buf, "MSG0 %ld|1", msg_arr[finda]);
CtdlIPC_putline(ipc, buf);
CtdlIPC_getline(ipc, buf);
while (CtdlIPC_getline(ipc, buf), strcmp(buf, "000"))
/* $Id$ */
+
+#define MAXURLS 50 /* Max embedded URL's per message */
+extern int num_urls;
+extern char urls[MAXURLS][SIZ];
+
int ka_system(char *shc);
int entmsg(CtdlIPC *ipc, int is_reply, int c);
void readmsgs(CtdlIPC *ipc, enum MessageList c, enum MessageDirection rdir, int q);