Skip to content

Commit 2b251a8

Browse files
Update WebForms.h
1 parent fa59c14 commit 2b251a8

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

c/WebForms.h

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,80 +1143,58 @@ void WebForms_AppendForm(WebForms* webForms, WebForms* form) {
11431143
#define MAX_STRING_LENGTH 256
11441144

11451145
// Function declarations
1146-
char* id(const char* Id);
1147-
char* name(const char* Name);
1148-
char* nameWithIndex(const char* Name, int Index);
1149-
char* tag(const char* Tag);
1150-
char* tagWithIndex(const char* Tag, int Index);
1151-
char* classString(const char* Class);
1152-
char* classWithIndex(const char* Class, int Index);
1153-
char* query(const char* Query);
1154-
char* queryAll(const char* Query);
1155-
1156-
// Fetch function declarations
1157-
char* random(int MaxValue);
1158-
char* randomWithMin(int MinValue, int MaxValue);
1159-
const char* dateYear();
1160-
const char* dateMonth();
1161-
const char* dateDay();
1162-
const char* dateHours();
1163-
const char* dateMinutes();
1164-
const char* dateSeconds();
1165-
const char* dateMilliseconds();
1166-
char* cookie(const char* Key);
1167-
char* session(const char* Key);
1168-
char* sessionWithReplace(const char* Key, const char* ReplaceValue);
1169-
char* sessionAndRemove(const char* Key);
1170-
char* sessionAndRemoveWithReplace(const char* Key, const char* ReplaceValue);
1171-
char* saved(const char* Key);
1172-
char* cache(const char* Key);
1173-
char* cacheWithReplace(const char* Key, const char* ReplaceValue);
1174-
char* cacheAndRemove(const char* Key);
1175-
char* cacheAndRemoveWithReplace(const char* Key, const char* ReplaceValue);
1176-
char* script(const char* ScriptText);
1146+
char* InputPlace_Id(const char* Id);
1147+
char* InputPlace_Name(const char* Name);
1148+
char* InputPlace_NameWithIndex(const char* Name, int Index);
1149+
char* InputPlace_Tag(const char* Tag);
1150+
char* InputPlace_TagWithIndex(const char* Tag, int Index);
1151+
char* InputPlace_ClassString(const char* Class);
1152+
char* InputPlace_ClassWithIndex(const char* Class, int Index);
1153+
char* InputPlace_Query(const char* Query);
1154+
char* InputPlace_QueryAll(const char* Query);
11771155

11781156
// Function definitions
1179-
char* id(const char* Id) {
1157+
char* InputPlace_Id(const char* Id) {
11801158
return strdup(Id);
11811159
}
11821160

1183-
char* name(const char* Name) {
1161+
char* InputPlace_Name(const char* Name) {
11841162
char* result = (char*)malloc(MAX_STRING_LENGTH);
11851163
snprintf(result, MAX_STRING_LENGTH, "(%s)", Name);
11861164
return result;
11871165
}
11881166

1189-
char* nameWithIndex(const char* Name, int Index) {
1167+
char* InputPlace_NameWithIndex(const char* Name, int Index) {
11901168
char* result = (char*)malloc(MAX_STRING_LENGTH);
11911169
snprintf(result, MAX_STRING_LENGTH, "(%s)%d", Name, Index);
11921170
return result;
11931171
}
11941172

1195-
char* tag(const char* Tag) {
1173+
char* InputPlace_Tag(const char* Tag) {
11961174
char* result = (char*)malloc(MAX_STRING_LENGTH);
11971175
snprintf(result, MAX_STRING_LENGTH, "<%s>", Tag);
11981176
return result;
11991177
}
12001178

1201-
char* tagWithIndex(const char* Tag, int Index) {
1179+
char* InputPlace_TagWithIndex(const char* Tag, int Index) {
12021180
char* result = (char*)malloc(MAX_STRING_LENGTH);
12031181
snprintf(result, MAX_STRING_LENGTH, "<%s>%d", Tag, Index);
12041182
return result;
12051183
}
12061184

1207-
char* classString(const char* Class) {
1185+
char* InputPlace_Class(const char* Class) {
12081186
char* result = (char*)malloc(MAX_STRING_LENGTH);
12091187
snprintf(result, MAX_STRING_LENGTH, "{%s}", Class);
12101188
return result;
12111189
}
12121190

1213-
char* classWithIndex(const char* Class, int Index) {
1191+
char* InputPlace_ClassWithIndex(const char* Class, int Index) {
12141192
char* result = (char*)malloc(MAX_STRING_LENGTH);
12151193
snprintf(result, MAX_STRING_LENGTH, "{%s}%d", Class, Index);
12161194
return result;
12171195
}
12181196

1219-
char* query(const char* Query) {
1197+
char* InputPlace_Query(const char* Query) {
12201198
char* result = (char*)malloc(MAX_STRING_LENGTH);
12211199
snprintf(result, MAX_STRING_LENGTH, "*%s", Query);
12221200
// Replace '=' with '$[eq];' (simple implementation)
@@ -1228,95 +1206,117 @@ char* query(const char* Query) {
12281206
return result;
12291207
}
12301208

1231-
char* queryAll(const char* Query) {
1209+
char* InputPlace_QueryAll(const char* Query) {
12321210
char* result = (char*)malloc(MAX_STRING_LENGTH);
12331211
snprintf(result, MAX_STRING_LENGTH, "[%s", Query);
12341212

12351213
return result;
12361214
}
12371215

1216+
// Fetch function declarations
1217+
char* Fetch_Random(int MaxValue);
1218+
char* Fetch_RandomWithMin(int MinValue, int MaxValue);
1219+
const char* Fetch_DateYear();
1220+
const char* Fetch_DateMonth();
1221+
const char* Fetch_DateDay();
1222+
const char* Fetch_DateHours();
1223+
const char* Fetch_DateMinutes();
1224+
const char* Fetch_DateSeconds();
1225+
const char* Fetch_DateMilliseconds();
1226+
char* Fetch_Cookie(const char* Key);
1227+
char* Fetch_session(const char* Key);
1228+
char* Fetch_sessionWithReplace(const char* Key, const char* ReplaceValue);
1229+
char* Fetch_sessionAndRemove(const char* Key);
1230+
char* Fetch_sessionAndRemoveWithReplace(const char* Key, const char* ReplaceValue);
1231+
char* Fetch_saved(const char* Key);
1232+
char* Fetch_Cache(const char* Key);
1233+
char* Fetch_CacheWithReplace(const char* Key, const char* ReplaceValue);
1234+
char* Fetch_CacheAndRemove(const char* Key);
1235+
char* Fetch_CacheAndRemoveWithReplace(const char* Key, const char* ReplaceValue);
1236+
char* Fetch_script(const char* ScriptText);
1237+
12381238
// Fetch function definitions
1239-
char* random(int MaxValue) {
1239+
char* Fetch_Random(int MaxValue) {
12401240
char* result = (char*)malloc(MAX_STRING_LENGTH);
12411241
snprintf(result, MAX_STRING_LENGTH, "@mr%d", MaxValue);
12421242
return result;
12431243
}
12441244

1245-
char* randomWithMin(int MinValue, int MaxValue) {
1245+
char* Fetch_RandomWithMin(int MinValue, int MaxValue) {
12461246
char* result = (char*)malloc(MAX_STRING_LENGTH);
12471247
snprintf(result, MAX_STRING_LENGTH, "@mr%d,%d", MaxValue, MinValue);
12481248
return result;
12491249
}
12501250

1251-
const char* dateYear() { return "@dy"; }
1252-
const char* dateMonth() { return "@dm"; }
1253-
const char* dateDay() { return "@dd"; }
1254-
const char* dateHours() { return "@dh"; }
1255-
const char* dateMinutes() { return "@di"; }
1256-
const char* dateSeconds() { return "@ds"; }
1257-
const char* dateMilliseconds() { return "@dl"; }
1251+
const char* Fetch_DateYear() { return "@dy"; }
1252+
const char* Fetch_DateMonth() { return "@dm"; }
1253+
const char* Fetch_DateDay() { return "@dd"; }
1254+
const char* Fetch_DateHours() { return "@dh"; }
1255+
const char* Fetch_DateMinutes() { return "@di"; }
1256+
const char* Fetch_DateSeconds() { return "@ds"; }
1257+
const char* Fetch_DateMilliseconds() { return "@dl"; }
12581258

1259-
char* cookie(const char* Key) {
1259+
char* Fetch_Cookie(const char* Key) {
12601260
char* result = (char*)malloc(MAX_STRING_LENGTH);
12611261
snprintf(result, MAX_STRING_LENGTH, "@co%s", Key);
12621262
return result;
12631263
}
12641264

1265-
char* session(const char* Key) {
1265+
char* Fetch_Session(const char* Key) {
12661266
char* result = (char*)malloc(MAX_STRING_LENGTH);
12671267
snprintf(result, MAX_STRING_LENGTH, "@cs%s", Key);
12681268
return result;
12691269
}
12701270

1271-
char* sessionWithReplace(const char* Key, const char* ReplaceValue) {
1271+
char* Fetch_SessionWithReplace(const char* Key, const char* ReplaceValue) {
12721272
char* result = (char*)malloc(MAX_STRING_LENGTH);
12731273
snprintf(result, MAX_STRING_LENGTH, "@cs%s,%s", Key, ReplaceValue);
12741274
return result;
12751275
}
12761276

1277-
char* sessionAndRemove(const char* Key) {
1277+
char* Fetch_SessionAndRemove(const char* Key) {
12781278
char* result = (char*)malloc(MAX_STRING_LENGTH);
12791279
snprintf(result, MAX_STRING_LENGTH, "@cl%s", Key);
12801280
return result;
12811281
}
12821282

1283-
char* sessionAndRemoveWithReplace(const char* Key, const char* ReplaceValue) {
1283+
char* Fetch_SessionAndRemoveWithReplace(const char* Key, const char* ReplaceValue) {
12841284
char* result = (char*)malloc(MAX_STRING_LENGTH);
12851285
snprintf(result, MAX_STRING_LENGTH, "@cl%s,%s", Key, ReplaceValue);
12861286
return result;
12871287
}
12881288

1289-
char* saved(const char* Key) {
1289+
char* Fetch_Saved(const char* Key) {
12901290
char* result = (char*)malloc(MAX_STRING_LENGTH);
12911291
snprintf(result, MAX_STRING_LENGTH, "@cl%s", Key);
12921292
return result;
12931293
}
12941294

1295-
char* cache(const char* Key) {
1295+
char* Fetch_Cache(const char* Key) {
12961296
char* result = (char*)malloc(MAX_STRING_LENGTH);
12971297
snprintf(result, MAX_STRING_LENGTH, "@cd%s", Key);
12981298
return result;
12991299
}
13001300

1301-
char* cacheWithReplace(const char* Key, const char* ReplaceValue) {
1301+
char* Fetch_CacheWithReplace(const char* Key, const char* ReplaceValue) {
13021302
char* result = (char*)malloc(MAX_STRING_LENGTH);
13031303
snprintf(result, MAX_STRING_LENGTH, "@cd%s,%s", Key, ReplaceValue);
13041304
return result;
13051305
}
13061306

1307-
char* cacheAndRemove(const char* Key) {
1307+
char* Fetch_CacheAndRemove(const char* Key) {
13081308
char* result = (char*)malloc(MAX_STRING_LENGTH);
13091309
snprintf(result, MAX_STRING_LENGTH, "@ct%s", Key);
13101310
return result;
13111311
}
13121312

1313-
char* cacheAndRemoveWithReplace(const char* Key, const char* ReplaceValue) {
1313+
char* Fetch_CacheAndRemoveWithReplace(const char* Key, const char* ReplaceValue) {
13141314
char* result = (char*)malloc(MAX_STRING_LENGTH);
13151315
snprintf(result, MAX_STRING_LENGTH, "@ct%s,%s", Key, ReplaceValue);
13161316
return result;
13171317
}
13181318

1319-
char* script(const char* ScriptText) {
1319+
char* Fetch_Script(const char* ScriptText) {
13201320
char* result = (char*)malloc(MAX_STRING_LENGTH);
13211321
snprintf(result, MAX_STRING_LENGTH, "@_%s", ScriptText);
13221322
// Replace '\n' with '$[ln];' (simple implementation)

0 commit comments

Comments
 (0)