-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
the first lines of the the .diff describe them.
Reagars,
Juan.
-----BEGIN PGP SIGNATURE-----
iD8DBQE9oHLEUMlRieHkprgRAg2YAKCPiy/OrQO75M+KIbUYOAXkRqFp2wCgy67e
C6vmLNa6I4pP9Opy6yWM+60=
=KkYU
-----END PGP SIGNATURE-----
D:
D: don't strip the plugin library if --enable-debug was set
D:
T: 20020928
Y:
Index: admin/acinclude.m4.in
===================================================================
RCS file: /cvsroot/licq/licq-common/admin/acinclude.m4.in,v
retrieving revision 1.12
diff -u -d -p -r1.12 acinclude.m4.in
--- admin/acinclude.m4.in 3 Dec 2001 19:17:29 -0000 1.12
+++ admin/acinclude.m4.in 28 Sep 2002 17:57:44 -0000
@@ -113,6 +113,7 @@ fi
if test "$licq_use_debug" = "no"; then
CXXFLAGS="`echo $CXXFLAGS | sed s/-g//`"
CFLAGS="`echo $CFLAGS | sed s/-g//`"
+ LDFLAGS="$LDFLAGS -s"
fi
])
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/licq/console/src/Makefile.am,v
retrieving revision 1.7
diff -u -d -p -r1.7 Makefile.am
--- src/Makefile.am 27 Oct 2001 13:27:47 -0000 1.7
+++ src/Makefile.am 28 Sep 2002 17:57:44 -0000
@@ -14,4 +14,4 @@ licq_console_la_SOURCES = console.cpp co
console_tab.cpp main.cpp window.cpp
-licq_console_la_LDFLAGS = -s -module -avoid-version
+licq_console_la_LDFLAGS = -module -avoid-version
D:
D: o Fail to load plugin if stdout is not a tty
D: o Fail to load more than one console plugin
D:
T: 20020928
Y:
Index: src/main.cpp
===================================================================
RCS file: /cvsroot/licq/console/src/main.cpp,v
retrieving revision 1.18
diff -u -d -p -r1.18 main.cpp
--- src/main.cpp 6 Aug 2002 04:45:51 -0000 1.18
+++ src/main.cpp 28 Sep 2002 18:09:34 -0000
@@ -12,6 +12,9 @@
CLicqConsole *licqConsole;
+
+static bool bLoaded = false; /* the plugin is already loaded ? */
+
const char *LP_Usage()
{
static const char usage[] =
@@ -51,13 +54,20 @@ const char *LP_ConfigFile()
bool LP_Init(int argc, char **argv)
{
+
+ if( !isatty(1) )
+ {
+ gLog.Error("%sThe standard output is not a terminal!\n", L_CONSOLExSTR);
+ return false;
+ }
+
//char *LocaleVal = new char;
//LocaleVal = setlocale (LC_ALL, "");
//bindtextdomain (PACKAGE, LOCALEDIR);
//textdomain (PACKAGE);
setlocale(LC_ALL, "");
- // parse command line for arguments
+ // parse command line for arguments
int i = 0;
while( (i = getopt(argc, argv, "h")) > 0)
{
@@ -68,8 +78,14 @@ bool LP_Init(int argc, char **argv)
return false;
}
}
+ if( bLoaded )
+ {
+ gLog.Error("%sPlugin already loaded\n", L_CONSOLExSTR);
+ return false;
+ }
licqConsole = new CLicqConsole(argc, argv);
- return (licqConsole != NULL);
+
+ return bLoaded = (licqConsole != NULL);
}
D:
D: Fix a buffer overflown in the main command line.
D: Yes. no user will put more than 1024 characters because
D: the plugin hasn't the feature of edition/scroll but maybe he just
D: clicked his mouse....
D:
T: 20021006
===================================================================
RCS file: /cvsroot/licq/console/src/console.cpp,v
retrieving revision 1.74
diff -u -d -p -r1.74 console.cpp
--- src/console.cpp 9 Sep 2002 23:11:37 -0000 1.74
+++ src/console.cpp 6 Oct 2002 15:43:22 -0000
@@ -1025,11 +1025,33 @@ void CLicqConsole::InputLogWindow(int cI
*-------------------------------------------------------------------------*/
void CLicqConsole::InputCommand(int cIn)
{
- static char szIn[1024];
+ static char *szIn;
static int nPos = 0;
+ static int nSize = 0;
static int nTabs = 0;
static struct STabCompletion sTabCompletion;
+ if( nPos + 1 >= nSize )
+ {
+ char *p;
+
+ if( nSize == 0 )
+ nSize = 1024;
+ else
+ nSize*=2;
+
+ p = (char *) realloc(szIn,nSize);
+ if( p == NULL )
+ { nSize /=2;
+ gLog.Error("%sMemory exhausted! you will lose this char.\n",
+ L_CONSOLExSTR);
+ return;
+ }
+ else
+ szIn = p;
+ }
+
+
// Now check for keys
switch (cIn)
{