Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2002 19:48:40 +0100 (CET)
From:      Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        e0026813@stud3.tuwien.ac.at
Subject:   ports/45765: [FIX BENTO] print/cpp2latex on -current
Message-ID:  <20021126184840.6E7786B9@frog.fafoe>

next in thread | raw e-mail | index | archive | help

>Number:         45765
>Category:       ports
>Synopsis:       [FIX BENTO] print/cpp2latex on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 26 10:50:07 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Farfeleder
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD frog.fafoe 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Fri Nov 22 17:42:48 CET 2002 freebsd@frog.fafoe:/freebsd/current/obj/freebsd/current/src/sys/FROG i386


	
>Description:
cpp2latex uses some rather old/dubious C++ code which is rejected by GCC
3.X.  From the Bento error log:

Making all in cpp2latex
c++ -DHAVE_CONFIG_H -I. -I. -I..     -O -pipe -mcpu=pentiumpro -c
main.cpp
main.cpp:29: 'string' is used as a type, but is not defined as a type.
main.cpp:30: 'string' is used as a type, but is not defined as a type.
main.cpp:33: 'vector' is used as a type, but is not defined as a type.
main.cpp:34: `ifstream' was not declared in this scope
main.cpp:34: `src' was not declared in this scope
main.cpp:34: syntax error before `*' token
main.cpp:34: 'string' is used as a type, but is not defined as a type.
main.cpp:37: `ifstream' was not declared in this scope
main.cpp:37: `src' was not declared in this scope
main.cpp:37: `bool satzzeichen' redeclared as different kind of symbol
main.cpp:36: previous declaration of `bool satzzeichen(char)'
main.cpp: In function `int main(int, char**)':
main.cpp:58: syntax error before `=' token
main.cpp:82: `cerr' undeclared (first use this function)
main.cpp:82: (Each undeclared identifier is reported only once for each 
   function it appears in.)
main.cpp:82: `endl' undeclared (first use this function)
main.cpp:83: syntax error before `;' token
main.cpp:84: `file' undeclared (first use this function)
main.cpp:97: `tab' undeclared (first use this function)
main.cpp:107: syntax error before `=' token
main.cpp:117: `out' undeclared (first use this function)
main.cpp:117: `syntax' undeclared (first use this function)
main.cpp:194: `satzzeichen' cannot be used as a function
main.cpp:203: syntax error before `=' token
main.cpp:204: `tmp' undeclared (first use this function)
main.cpp:220: `cout' undeclared (first use this function)
main.cpp: At global scope:
main.cpp:255: `ifstream' was not declared in this scope
main.cpp:255: `src' was not declared in this scope
main.cpp:255: syntax error before `*' token
main.cpp:259: syntax error before `for'
*** Error code 1

	
>How-To-Repeat:
portinstall cpp2latex
	
>Fix:

	

--- cpp2latex.diff begins here ---
Index: files/patch-aa
===================================================================
RCS file: files/patch-aa
diff -N files/patch-aa
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-aa	26 Nov 2002 18:33:01 -0000
@@ -0,0 +1,28 @@
+--- cpp2latex/main.cpp.orig	Mon Jun 11 14:14:19 2001
++++ cpp2latex/main.cpp	Tue Nov 26 19:32:41 2002
+@@ -25,6 +25,14 @@
+ #include <fstream>
+ #include <vector>
+ 
++using std::cerr;
++using std::cout;
++using std::endl;
++using std::getline;
++using std::ifstream;
++using std::string;
++using std::vector;
++
+ struct replace{
+ 	string voraus;
+ 	string ersetzt;
+@@ -87,8 +95,8 @@
+ 	cerr<<"  Skipping "<<skip<<" lines."<<endl;
+ 	for(int i=0; i<skip; i++)
+ 	{
+-	char* tmp;
+-		file.gets( &tmp );
++	string line;
++		getline( file, line );
+ 	}
+ 
+ 	// Tabspace setzen
--- cpp2latex.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021126184840.6E7786B9>