Changeset 7381
- Timestamp:
- 2004-05-24T15:34:40+12:00 (20 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/recptmain.cpp
r1860 r7381 30 30 int main () { 31 31 receptionist recpt; 32 cgiwrapper (recpt, "");32 cgiwrapper (recpt, g_EmptyText); 33 33 return 0; 34 34 } -
trunk/gsdl/src/recpt/statusaction.cpp
r7371 r7381 794 794 #endif 795 795 796 delete cerrfilename;796 delete []cerrfilename; 797 797 if (errin) { 798 798 textout << outconvert << "<p>The error log, " … … 841 841 #endif 842 842 843 delete gsdlsite_cfgc;843 delete []gsdlsite_cfgc; 844 844 845 845 if (gsdlsitein) { … … 915 915 write(fd, buffer, num_chars); 916 916 GSDL_UNLOCK_FILE (fd); 917 delete buffer;917 delete []buffer; 918 918 close (fd); 919 919 textout << outconvert << disp << "_status:changemaincfgsuccess_"; … … 923 923 textout << outconvert << disp << "_status:changemaincfgfail_"; 924 924 } 925 delete cfgfilec;925 delete []cfgfilec; 926 926 } 927 927 … … 973 973 arg_ainfo.multiplechar = true; 974 974 arg_ainfo.defaultstatus = cgiarginfo::none; 975 arg_ainfo.argdefault = "";975 arg_ainfo.argdefault = g_EmptyText; 976 976 arg_ainfo.savedarginfo = cgiarginfo::can; 977 977 argsinfo.addarginfo (NULL, arg_ainfo); … … 981 981 arg_ainfo.multiplechar = true; 982 982 arg_ainfo.defaultstatus = cgiarginfo::weak; 983 arg_ainfo.argdefault = "";983 arg_ainfo.argdefault = g_EmptyText; 984 984 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 985 985 argsinfo.addarginfo (NULL, arg_ainfo); … … 1047 1047 logout << "statusaction::define_internal_macros: couldn't open configuration file (" 1048 1048 << maincfgc << ") for reading\n"; 1049 disp.setmacro("maincfgfile", "status", "");1049 disp.setmacro("maincfgfile", "status", g_EmptyText); 1050 1050 } 1051 delete maincfgc;1051 delete []maincfgc; 1052 1052 } 1053 1053 } -
trunk/gsdl/src/recpt/userdb.cpp
r2750 r7381 48 48 text_t crypt_password; 49 49 50 if (text.empty()) return "";50 if (text.empty()) return g_EmptyText; 51 51 52 52 // encrypt the password 53 53 char *text_cstr = text.getcstr(); 54 if (text_cstr == NULL) return "";54 if (text_cstr == NULL) return g_EmptyText; 55 55 crypt_password = crypt(text_cstr, salt); 56 delete text_cstr;56 delete []text_cstr; 57 57 58 58 return crypt_password; … … 236 236 text_t format_user_groups(const text_t user_groups){ 237 237 238 text_t new_groups = "";238 text_t new_groups = g_EmptyText; 239 239 text_t::const_iterator here = user_groups.begin(); 240 240 text_t::const_iterator end = user_groups.end(); … … 287 287 text_t generate_key (const text_t &keydbfile, const text_t &username) { 288 288 gdbmclass keydb; 289 if (!keydb.opendatabase(keydbfile, GDBM_WRCREAT, 1000, true)) return "";289 if (!keydb.opendatabase(keydbfile, GDBM_WRCREAT, 1000, true)) return g_EmptyText; 290 290 291 291 text_t key = generate_key (keydb, username); -
trunk/gsdl/src/recpt/usersaction.cpp
r7375 r7381 61 61 arg_ainfo.multiplechar = true; 62 62 arg_ainfo.defaultstatus = cgiarginfo::weak; 63 arg_ainfo.argdefault = "";63 arg_ainfo.argdefault = g_EmptyText; 64 64 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 65 65 argsinfo.addarginfo (NULL, arg_ainfo); … … 70 70 arg_ainfo.multiplechar = true; 71 71 arg_ainfo.defaultstatus = cgiarginfo::weak; 72 arg_ainfo.argdefault = "";72 arg_ainfo.argdefault = g_EmptyText; 73 73 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 74 74 argsinfo.addarginfo (NULL, arg_ainfo); … … 79 79 arg_ainfo.multiplechar = true; 80 80 arg_ainfo.defaultstatus = cgiarginfo::weak; 81 arg_ainfo.argdefault = "";81 arg_ainfo.argdefault = g_EmptyText; 82 82 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 83 83 argsinfo.addarginfo (NULL, arg_ainfo); … … 88 88 arg_ainfo.multiplechar = true; 89 89 arg_ainfo.defaultstatus = cgiarginfo::weak; 90 arg_ainfo.argdefault = "";90 arg_ainfo.argdefault = g_EmptyText; 91 91 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 92 92 argsinfo.addarginfo (NULL, arg_ainfo); … … 97 97 arg_ainfo.multiplechar = true; 98 98 arg_ainfo.defaultstatus = cgiarginfo::weak; 99 arg_ainfo.argdefault = "";99 arg_ainfo.argdefault = g_EmptyText; 100 100 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 101 101 argsinfo.addarginfo (NULL, arg_ainfo); … … 106 106 arg_ainfo.multiplechar = true; 107 107 arg_ainfo.defaultstatus = cgiarginfo::weak; 108 arg_ainfo.argdefault = "";108 arg_ainfo.argdefault = g_EmptyText; 109 109 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 110 110 argsinfo.addarginfo (NULL, arg_ainfo); … … 115 115 arg_ainfo.multiplechar = true; 116 116 arg_ainfo.defaultstatus = cgiarginfo::weak; 117 arg_ainfo.argdefault = "";117 arg_ainfo.argdefault = g_EmptyText; 118 118 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 119 119 argsinfo.addarginfo (NULL, arg_ainfo); … … 124 124 arg_ainfo.multiplechar = true; 125 125 arg_ainfo.defaultstatus = cgiarginfo::weak; 126 arg_ainfo.argdefault = "";126 arg_ainfo.argdefault = g_EmptyText; 127 127 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 128 128 argsinfo.addarginfo (NULL, arg_ainfo); … … 133 133 arg_ainfo.multiplechar = true; 134 134 arg_ainfo.defaultstatus = cgiarginfo::weak; 135 arg_ainfo.argdefault = "";135 arg_ainfo.argdefault = g_EmptyText; 136 136 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 137 137 argsinfo.addarginfo (NULL, arg_ainfo); … … 142 142 arg_ainfo.multiplechar = true; 143 143 arg_ainfo.defaultstatus = cgiarginfo::weak; 144 arg_ainfo.argdefault = "";144 arg_ainfo.argdefault = g_EmptyText; 145 145 arg_ainfo.savedarginfo = cgiarginfo::mustnot; 146 146 argsinfo.addarginfo (NULL, arg_ainfo); -
trunk/gsdl/src/recpt/z3950proto.cpp
r2905 r7381 76 76 errfile=stderr; 77 77 } 78 delete errf_str;78 delete []errf_str; 79 79 yyout=errfile; 80 80 … … 86 86 if (yyin==NULL) { 87 87 cerr << "Could not open "<<filename_str<<" for reading.\n"; 88 delete filename_str;88 delete []filename_str; 89 89 return; 90 90 } 91 delete filename_str;91 delete []filename_str; 92 92 zconfigparse(); 93 93 … … 239 239 << coll_str 240 240 << endl; 241 delete coll_str;241 delete []coll_str; 242 242 return; 243 243 } … … 335 335 336 336 // leave response.termInfo empty 337 // response.termInfo.push_back( ""); ??????? (should be empty if not req.)337 // response.termInfo.push_back(g_EmptyText); ??????? (should be empty if not req.) 338 338 339 339 // See if this is for a query action … … 484 484 again in the request, so for now we'll take advantage of this.*/ 485 485 486 int querytype=0; text_t field= "";486 int querytype=0; text_t field=g_EmptyText; 487 487 488 488 // get the Query out of the filterOptions. (we need get the Title) 489 text_t query= "";489 text_t query=g_EmptyText; 490 490 OptionValue_tarray::iterator opthere=request.filterOptions.begin(); 491 491 OptionValue_tarray::iterator opt_end=request.filterOptions.end(); … … 508 508 docs_here->metadata["Title"].values.push_back(doctitle); 509 509 } else { 510 docs_here->metadata[*fields_here].values.push_back( "");510 docs_here->metadata[*fields_here].values.push_back(g_EmptyText); 511 511 } 512 512 fields_here++; -
trunk/gsdl/src/recpt/z3950server.cpp
r1900 r7381 45 45 meta["hastxt"]="1"; 46 46 // for now, assume we don't want ANY DocumentButtons. 47 format["DocumentButtons"]= "";47 format["DocumentButtons"]=g_EmptyText; 48 48 } 49 49 … … 88 88 char* name_str=info->name.getcstr(); 89 89 int retval=z_cmd_open(serv_str,name_str); 90 delete serv_str;91 delete name_str;90 delete []serv_str; 91 delete []name_str; 92 92 if (retval==1) 93 93 // we got a connection error … … 175 175 parsed_query+=ptr; 176 176 } 177 delete ptr;177 delete []ptr; 178 178 } 179 179 … … 218 218 219 219 220 text_t expanded_query= "";220 text_t expanded_query=g_EmptyText; 221 221 parseQuery(query,querytype,fields,expanded_query); 222 222 … … 224 224 // following functions defined in yaz_zclient.c 225 225 *nummatches=z_cmd_dosearch(query_str); // returns # found, -1 on err. 226 delete query_str;226 delete []query_str; 227 227 if (*nummatches<=0) { 228 228 if (*nummatches==0) { … … 289 289 // query again. 290 290 291 text_t expanded_query= "";291 text_t expanded_query=g_EmptyText; 292 292 parseQuery(query,querytype,fields,expanded_query); 293 293 294 294 char* query_str=expanded_query.getcstr(); 295 295 int returned=z_cmd_dosearch(query_str); 296 delete query_str;296 delete []query_str; 297 297 if (returned<=0) { 298 298 // 0 => none.
Note:
See TracChangeset
for help on using the changeset viewer.