]> git.pld-linux.org Git - packages/cgilib.git/blame - cgilib-gcc3.patch
- tabs in preamble
[packages/cgilib.git] / cgilib-gcc3.patch
CommitLineData
c5167838
MM
1diff -ru cgilib-0.1.1/src/cgi.cc cgilib-0.1.1-/src/cgi.cc
2--- cgilib-0.1.1/src/cgi.cc 2000-03-25 03:44:01.000000000 +0100
3+++ cgilib-0.1.1-/src/cgi.cc 2003-09-16 21:07:54.000000000 +0200
4@@ -1,11 +1,11 @@
5 // Some useful functions for CGI processing...
6
7 #include "cgi.h"
8-extern "C" {
9+
10 #include <stdlib.h>
11-#include <iostream.h>
12 #include <stdio.h>
13-}
14+
15+#include <iostream>
16
17 CGI::CGI(Method m)
18 {
19@@ -81,7 +81,9 @@
20 hex[0]=s[s.find('%')+1];
21 hex[1]=s[s.find('%')+2];
22 hex[2]=0;
23- char a=(char) strtoul(hex, NULL, 16);
24+ char a[2];
25+ a[0] =(char) strtoul(hex, NULL, 16);
26+ a[1] = 0;
27 s=s.replace(s.find('%'), 3, a);
28 }
29 return s;
30diff -ru cgilib-0.1.1/src/cgi.h cgilib-0.1.1-/src/cgi.h
31--- cgilib-0.1.1/src/cgi.h 2000-03-25 03:44:01.000000000 +0100
32+++ cgilib-0.1.1-/src/cgi.h 2003-09-16 21:06:28.000000000 +0200
33@@ -6,6 +6,8 @@
34 #include <map>
35 #include <list>
36
37+using namespace std;
38+
39 typedef map<string const,string> strlist;
40 typedef map<string const,string>::iterator striterator;
41 typedef list<string> stringlist;
42diff -ru cgilib-0.1.1/src/form.cc cgilib-0.1.1-/src/form.cc
43--- cgilib-0.1.1/src/form.cc 2000-03-25 03:44:01.000000000 +0100
44+++ cgilib-0.1.1-/src/form.cc 2003-09-16 21:10:10.000000000 +0200
45@@ -44,7 +44,7 @@
46 s+=" />" + label;
47 body.insert(body.end(), s);
48 }
49-void form::addCheckBox(string name, string label="", bool checked=false)
50+void form::addCheckBox(string name, string label, bool checked)
51 {
52 string s="<input type=\"checkbox\" name=\"" + name + "\" value=\"on\"";
53 if(checked)
54@@ -59,7 +59,7 @@
55 body.insert(body.end(), *it);
56 body.insert(body.end(), "</select>");
57 }
58-void form::addSubmit(string text="")
59+void form::addSubmit(string text)
60 {
61 if(text.empty())
62 body.insert(body.end(), "<input type=\"submit\" />");
63diff -ru cgilib-0.1.1/src/form.h cgilib-0.1.1-/src/form.h
64--- cgilib-0.1.1/src/form.h 2000-03-25 03:44:01.000000000 +0100
65+++ cgilib-0.1.1-/src/form.h 2003-09-16 21:09:34.000000000 +0200
66@@ -4,6 +4,9 @@
67
68 #include <string>
69 #include <list>
70+
71+using namespace std;
72+
73 #include "html.h"
74
75 class OptionBoxItem;
76diff -ru cgilib-0.1.1/src/html.cc cgilib-0.1.1-/src/html.cc
77--- cgilib-0.1.1/src/html.cc 2000-03-25 03:44:01.000000000 +0100
78+++ cgilib-0.1.1-/src/html.cc 2003-09-16 21:11:10.000000000 +0200
79@@ -1,11 +1,11 @@
80 // Some useful functions for HTML code generation
81
82 #include "html.h"
83-extern "C" {
84+
85 #include <stdlib.h>
86-#include <iostream.h>
87 #include <stdio.h>
88-}
89+
90+#include <iostream>
91
92 HTML::HTML(string title, bool bodywhite, string description,
93 string keywords, string address, string encoding,
94diff -ru cgilib-0.1.1/src/html.h cgilib-0.1.1-/src/html.h
95--- cgilib-0.1.1/src/html.h 2000-03-25 03:44:01.000000000 +0100
96+++ cgilib-0.1.1-/src/html.h 2003-09-16 21:10:24.000000000 +0200
97@@ -6,6 +6,8 @@
98 #include <map>
99 #include <list>
100
101+using namespace std;
102+
103 class form;
104 typedef list<string> stringlist;
105
106diff -ru cgilib-0.1.1/src/socket.h cgilib-0.1.1-/src/socket.h
107--- cgilib-0.1.1/src/socket.h 2000-03-20 09:34:39.000000000 +0100
108+++ cgilib-0.1.1-/src/socket.h 2003-09-16 21:09:10.000000000 +0200
109@@ -2,11 +2,13 @@
110 #ifndef RH_SOCKET_H
111 #define RH_SOCKET_H 1
112
113+#include <sys/socket.h>
114+
115 #include <string>
116 #include <iostream>
117-extern "C" {
118-#include <sys/socket.h>
119-}
120+
121+using namespace std;
122+
123
124 /** Class for socket handling...
125 */
126diff -u cgilib-0.1.1-/test/cgi.cc cgilib-0.1.1/test/cgi.cc
127--- cgilib-0.1.1-/test/cgi.cc 2000-03-25 03:44:01.000000000 +0100
128+++ cgilib-0.1.1/test/cgi.cc 2003-09-16 21:30:03.000000000 +0200
129@@ -1,5 +1,6 @@
130 #include "cgi.h"
131 #include "html.h"
132+#include <iostream>
133 main(int argc, char **argv)
134 {
135 CGI a;
136diff -u cgilib-0.1.1-/test/form.cc cgilib-0.1.1/test/form.cc
137--- cgilib-0.1.1-/test/form.cc 2000-03-25 03:44:01.000000000 +0100
138+++ cgilib-0.1.1/test/form.cc 2003-09-16 21:30:18.000000000 +0200
139@@ -1,5 +1,6 @@
140 #include "html.h"
141 #include "form.h"
142+#include <iostream>
143 main(int argc, char **argv)
144 {
145 HTML h("Sample HTML generation");
This page took 0.10641 seconds and 4 git commands to generate.