[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src log_window.c,1.13,1.14
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src log_window.c,1.13,1.14 |
Date: |
Mon, 27 Jan 2003 13:16:34 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv16930/src
Modified Files:
log_window.c
Log Message:
- src/log_window.c
Don't f*ck up original buffer
Index: log_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/log_window.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- log_window.c 24 Jan 2003 20:41:31 -0000 1.13
+++ log_window.c 27 Jan 2003 18:16:31 -0000 1.14
@@ -430,34 +430,38 @@
void log_parse_and_add(char *buff, void *text)
{
+ char *tmp = NULL;
char *buff2 = NULL;
/* ME */
- if (!strncmp(buff,"<P> <FONT COLOR=\"#", strlen("<P> <FONT COLOR=\"#"))
- && isdigit(buff[strlen("<P> <FONT COLOR=\"#??????\"><B>1")])
- && strstr(buff, "/FONT> ")) {
+ tmp = strdup(buff);
+ printf("adding %s\n",tmp);
+ if (!strncmp(tmp,"<P> <FONT COLOR=\"#", strlen("<P> <FONT COLOR=\"#"))
+ && isdigit(tmp[strlen("<P> <FONT COLOR=\"#??????\"><B>1")])
+ && strstr(tmp, "/FONT> ")) {
/* seems to be a beginning of line... */
- buff2 = strstr(buff, "/FONT> ")+strlen("/FONT>");
+ buff2 = strstr(tmp, "/FONT> ")+strlen("/FONT>");
buff2[0] = '\0';
buff2++;
- gtk_eb_html_add(EXT_GTK_TEXT(text), buff,0,0,0);
+ gtk_eb_html_add(EXT_GTK_TEXT(text), tmp,0,0,0);
gtk_eb_html_add(EXT_GTK_TEXT(text), buff2,
iGetLocalPref("do_ignore_back"),
iGetLocalPref("do_ignore_fore"),
iGetLocalPref("do_ignore_font"));
} /* OTHER */
- else if (!strncmp(buff,"<P> <B><FONT COLOR=\"#", strlen("<P> <B><FONT
COLOR=\"#"))
- && isdigit(buff[strlen("<P> <B><FONT COLOR=\"#??????\">1")])
- && strstr(buff, "/FONT> </B> ")) {
+ else if (!strncmp(tmp,"<P> <B><FONT COLOR=\"#", strlen("<P> <B><FONT
COLOR=\"#"))
+ && isdigit(tmp[strlen("<P> <B><FONT COLOR=\"#??????\">1")])
+ && strstr(tmp, "/FONT> </B> ")) {
/* seems to be a beginning of line... */
- buff2 = strstr(buff, "/FONT> </B> ")+strlen("/FONT> </B>");
+ buff2 = strstr(tmp, "/FONT> </B> ")+strlen("/FONT> </B>");
buff2[0] = '\0';
buff2++;
- gtk_eb_html_add(EXT_GTK_TEXT(text), buff,0,0,0);
+ gtk_eb_html_add(EXT_GTK_TEXT(text), tmp,0,0,0);
gtk_eb_html_add(EXT_GTK_TEXT(text), buff2,
iGetLocalPref("do_ignore_back"),
iGetLocalPref("do_ignore_fore"),
iGetLocalPref("do_ignore_font"));
} else {
- gtk_eb_html_add(EXT_GTK_TEXT(text), buff,0,0,0);
+ gtk_eb_html_add(EXT_GTK_TEXT(text), tmp,0,0,0);
}
+ free(tmp);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src log_window.c,1.13,1.14,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.228,1.229 configure.in,1.224,1.225
- Next by Date:
Re: [Ayttm-commits] CVS: ayttm/modules/workwizu workwizu.c,1.20,1.21
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.228,1.229 configure.in,1.224,1.225
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/icq Makefile.am,1.4,1.5 icq.c,1.9,1.10
- Index(es):