[interchange-cvs] interchange - heins modified 3 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Dec 31 01:26:00 UTC 2008


User:      heins
Date:      2008-12-31 01:26:00 GMT
Modified:  scripts  compile_link.PL
Modified:  dist/src tlink.c vlink.c
Log:
Incorporate fixes suggested by Peter:

* Escape backslashes as well as returns and double quotes when
  loading defines.

* Prevent possible problems with printf formatting codes.

Revision  Changes    Path
2.10                 interchange/scripts/compile_link.PL


rev 2.10, prev_rev 2.9
Index: compile_link.PL
===================================================================
RCS file: /var/cvs/interchange/scripts/compile_link.PL,v
retrieving revision 2.9
retrieving revision 2.10
diff -u -r2.9 -r2.10
--- compile_link.PL	30 Dec 2008 20:59:22 -0000	2.9
+++ compile_link.PL	31 Dec 2008 01:26:00 -0000	2.10
@@ -3,7 +3,7 @@
 #
 # Interchange link program configurator
 #
-# $Id: compile_link.PL,v 2.9 2008-12-30 20:59:22 mheins Exp $
+# $Id: compile_link.PL,v 2.10 2008-12-31 01:26:00 mheins Exp $
 #
 # Copyright (C) 2002-2007 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -206,6 +206,7 @@
 	for(1 .. 3) {
 		my $line = <ERRFILE>;
 		$line ||= ' ';
+		$line =~ s/\\/\\\\/g;
 		$line =~ s/\r/\\r/g;
 		$line =~ s/\n/\\n/g;
 		$line =~ s/"/\\"/g;
@@ -218,6 +219,7 @@
 	}
 
 	$line ||= ' ';
+	$line =~ s/\\/\\\\/g;
 	$line =~ s/\r/\\r/g;
 	$line =~ s/\n/\\n/g;
 	$line =~ s/"/\\"/g;



2.8                  interchange/dist/src/tlink.c


rev 2.8, prev_rev 2.7
Index: tlink.c
===================================================================
RCS file: /var/cvs/interchange/dist/src/tlink.c,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- tlink.c	30 Dec 2008 20:59:22 -0000	2.7
+++ tlink.c	31 Dec 2008 01:26:00 -0000	2.8
@@ -2,7 +2,7 @@
  * tlink.c: runs as a CGI program and passes request to Interchange
  *          server via TCP/IP
  *
- * $Id: tlink.c,v 2.7 2008-12-30 20:59:22 mheins Exp $
+ * $Id: tlink.c,v 2.8 2008-12-31 01:26:00 mheins Exp $
  *
  * Copyright (C) 2005-2007 Interchange Development Group,
  * http://www.icdevgroup.org/
@@ -71,11 +71,11 @@
  */
 void server_not_running()
 {
-  printf(LINK_MESSAGE_HEAD);
-  printf(LINK_MESSAGE_LINE1);
-  printf(LINK_MESSAGE_LINE2);
-  printf(LINK_MESSAGE_LINE3);
-  printf(LINK_MESSAGE_LINE4);
+  printf("%s", LINK_MESSAGE_HEAD);
+  printf("%s", LINK_MESSAGE_LINE1);
+  printf("%s", LINK_MESSAGE_LINE2);
+  printf("%s", LINK_MESSAGE_LINE3);
+  printf("%s", LINK_MESSAGE_LINE4);
   exit(1);
 }
 



2.8                  interchange/dist/src/vlink.c


rev 2.8, prev_rev 2.7
Index: vlink.c
===================================================================
RCS file: /var/cvs/interchange/dist/src/vlink.c,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- vlink.c	30 Dec 2008 20:59:22 -0000	2.7
+++ vlink.c	31 Dec 2008 01:26:00 -0000	2.8
@@ -2,7 +2,7 @@
  * vlink.c: runs as a CGI program and passes request to Interchange
  *          server via UNIX socket
  *
- * $Id: vlink.c,v 2.7 2008-12-30 20:59:22 mheins Exp $
+ * $Id: vlink.c,v 2.8 2008-12-31 01:26:00 mheins Exp $
  *
  * Copyright (C) 2005-2007 Interchange Development Group,
  * http://www.icdevgroup.org/
@@ -60,11 +60,11 @@
  */
 void server_not_running()
 {
-  printf(LINK_MESSAGE_HEAD);
-  printf(LINK_MESSAGE_LINE1);
-  printf(LINK_MESSAGE_LINE2);
-  printf(LINK_MESSAGE_LINE3);
-  printf(LINK_MESSAGE_LINE4);
+  printf("%s", LINK_MESSAGE_HEAD);
+  printf("%s", LINK_MESSAGE_LINE1);
+  printf("%s", LINK_MESSAGE_LINE2);
+  printf("%s", LINK_MESSAGE_LINE3);
+  printf("%s", LINK_MESSAGE_LINE4);
   exit(1);
 }
 







More information about the interchange-cvs mailing list