310_uppsrc.diff

The diff file to apply for uppsrc directory - Sender Ghost, 07/08/2012 11:01 PM

Download (1.57 KB)

View differences:

uppsrc/CppBase/Pre.cpp 2012-07-09 00:50:48 +0400
103 103
			}
104 104
			res.preprocessorLinesRemoved++;
105 105
		}
106
		else
107
		if(rm[0] == 'S' && rm[1] == 'K' && rm[2] == 'Y' &&
108
		   rm[3] == 'L' && rm[4] == 'A' && rm[5] == 'R' && rm[6] == 'K' && !iscid(rm[7])) {
109
			const char *s = rm + 7;
110
			while(*s == ' ' || *s == '\t') s++;
111
			if(*s++ == '(') {
112
				String name;
113
				bool bracket = false;
114
				while(iscid(*s))
115
					name.Cat(*s++);
116
				while(*s != '{' && *s) s++;
117
				if(*s == '{')
118
					bracket = true;
119
				if(!name.IsEmpty()) {
120
					res.text << "void " << name << "(Http& http)";
121
					if (bracket) res.text << " {";
122
				}
123
			}
124
			res.preprocessorLinesRemoved++;
125
		}
106 126
		else {
107 127
			bool lineContainsComment = false;
108 128
			bool lineContainsNonComment = false;
uppsrc/Skylark/Http.h 2012-07-08 19:29:32 +0400
130 130
String HttpResponse(int code, const char *phrase, const String& data, const char *content_type = NULL);
131 131

  
132 132
void RegisterView(void (*view)(Http&), const char *id, const char *path);
133

  
133
//$-void SKYLARK(void *name, const char *path);
134 134
#define SKYLARK(name, path)  void name(Http& http); INITBLOCK { UPP::RegisterView(name, #name, path); } void name(Http& http)
135

  
135
//$+
136 136
Vector<String> *GetUrlViewLinkParts(const String& id);
137 137

  
138 138
String MakeLink(void (*view)(Http&), const Vector<Value>& arg);