Changeset 5388
- Timestamp:
- 03/14/08 16:22:42 (4 months ago)
- Files:
-
- wired/trunk/wired/accounts.c (modified) (7 diffs)
- wired/trunk/wired/files.c (modified) (5 diffs)
- wired/trunk/wired/news.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/wired/accounts.c
r4985 r5388 185 185 } 186 186 187 wi_file_write (file, WI_STR("%#@:%#@:%#@:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%u:%u:%u:%u:%d:%#@\n"),188 account->name,189 account->password,190 account->group,191 account->get_user_info,192 account->broadcast,193 account->post_news,194 account->clear_news,195 account->download,196 account->upload,197 account->upload_anywhere,198 account->create_folders,199 account->alter_files,200 account->delete_files,201 account->view_dropboxes,202 account->create_accounts,203 account->edit_accounts,204 account->delete_accounts,205 account->elevate_privileges,206 account->kick_users,207 account->ban_users,208 account->cannot_be_kicked,209 account->download_speed,210 account->upload_speed,211 account->download_limit,212 account->upload_limit,213 account->set_topic,214 account->files);187 wi_file_write_format(file, WI_STR("%#@:%#@:%#@:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%u:%u:%u:%u:%d:%#@\n"), 188 account->name, 189 account->password, 190 account->group, 191 account->get_user_info, 192 account->broadcast, 193 account->post_news, 194 account->clear_news, 195 account->download, 196 account->upload, 197 account->upload_anywhere, 198 account->create_folders, 199 account->alter_files, 200 account->delete_files, 201 account->view_dropboxes, 202 account->create_accounts, 203 account->edit_accounts, 204 account->delete_accounts, 205 account->elevate_privileges, 206 account->kick_users, 207 account->ban_users, 208 account->cannot_be_kicked, 209 account->download_speed, 210 account->upload_speed, 211 account->download_limit, 212 account->upload_limit, 213 account->set_topic, 214 account->files); 215 215 216 216 result = true; … … 238 238 } 239 239 240 wi_file_write (file, WI_STR("%#@:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%u:%u:%u:%u:%d:%#@\n"),241 account->name,242 account->get_user_info,243 account->broadcast,244 account->post_news,245 account->clear_news,246 account->download,247 account->upload,248 account->upload_anywhere,249 account->create_folders,250 account->alter_files,251 account->delete_files,252 account->view_dropboxes,253 account->create_accounts,254 account->edit_accounts,255 account->delete_accounts,256 account->elevate_privileges,257 account->kick_users,258 account->ban_users,259 account->cannot_be_kicked,260 account->download_speed,261 account->upload_speed,262 account->download_limit,263 account->upload_limit,264 account->set_topic,265 account->files);240 wi_file_write_format(file, WI_STR("%#@:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%u:%u:%u:%u:%d:%#@\n"), 241 account->name, 242 account->get_user_info, 243 account->broadcast, 244 account->post_news, 245 account->clear_news, 246 account->download, 247 account->upload, 248 account->upload_anywhere, 249 account->create_folders, 250 account->alter_files, 251 account->delete_files, 252 account->view_dropboxes, 253 account->create_accounts, 254 account->edit_accounts, 255 account->delete_accounts, 256 account->elevate_privileges, 257 account->kick_users, 258 account->ban_users, 259 account->cannot_be_kicked, 260 account->download_speed, 261 account->upload_speed, 262 account->download_limit, 263 account->upload_limit, 264 account->set_topic, 265 account->files); 266 266 267 267 result = true; … … 406 406 407 407 while((string = wi_file_read_line(file))) 408 wi_file_write (tmpfile, WI_STR("%@\n"), string);408 wi_file_write_format(tmpfile, WI_STR("%@\n"), string); 409 409 410 410 wi_file_truncate(file, 0); … … 422 422 } 423 423 424 wi_file_write (file, WI_STR("%@\n"), string);424 wi_file_write_format(file, WI_STR("%@\n"), string); 425 425 } 426 426 … … 542 542 while((string = wi_file_read_line(file))) { 543 543 if(wi_string_length(string) == 0 || wi_string_has_prefix(string, WI_STR("#"))) { 544 wi_file_write (tmpfile, WI_STR("%@\n"), string);544 wi_file_write_format(tmpfile, WI_STR("%@\n"), string); 545 545 } else { 546 546 array = wi_string_components_separated_by_string(string, WI_STR(":")); … … 549 549 result = true; 550 550 else 551 wi_file_write (tmpfile, WI_STR("%@\n"), string);551 wi_file_write_format(tmpfile, WI_STR("%@\n"), string); 552 552 } 553 553 } … … 557 557 558 558 while((string = wi_file_read(tmpfile, WI_FILE_BUFFER_SIZE))) 559 wi_file_write (file, WI_STR("%@"), string);559 wi_file_write_format(file, WI_STR("%@"), string); 560 560 561 561 return result; wired/trunk/wired/files.c
r5357 r5388 857 857 858 858 if(wi_file_rename(path, wd_settings.index)) { 859 wi_file_write (file, WI_STR("%s%c%u%c%llu"),859 wi_file_write_format(file, WI_STR("%s%c%u%c%llu"), 860 860 "/", WD_FIELD_SEPARATOR, 861 861 wd_files_unique_count, WD_FIELD_SEPARATOR, … … 1002 1002 string = wi_date_iso8601_string(wi_date_with_time(sb.mtime)); 1003 1003 1004 wi_file_write (file, WI_STR("%#s%c%#s%#@%c%u%c%llu%c%#@%c%#@\n"),1005 p->fts_name, WD_FIELD_SEPARATOR,1006 pathprefix,1007 virtualpath, WD_FIELD_SEPARATOR,1008 type, WD_FIELD_SEPARATOR,1009 size, WD_FIELD_SEPARATOR,1010 string, WD_FIELD_SEPARATOR,1011 string);1012 1004 wi_file_write_format(file, WI_STR("%#s%c%#s%#@%c%u%c%llu%c%#@%c%#@\n"), 1005 p->fts_name, WD_FIELD_SEPARATOR, 1006 pathprefix, 1007 virtualpath, WD_FIELD_SEPARATOR, 1008 type, WD_FIELD_SEPARATOR, 1009 size, WD_FIELD_SEPARATOR, 1010 string, WD_FIELD_SEPARATOR, 1011 string); 1012 1013 1013 /* track unique inodes */ 1014 1014 set = wi_hash_data_for_key(wd_files_index_hash, (void *) sb.dev); … … 1230 1230 1231 1231 if(comment && wi_string_length(comment) > 0) { 1232 wi_file_write (tmpfile, WI_STR("%#@%s%#@%s"),1233 name, WD_FILES_COMMENT_FIELD_SEPARATOR,1234 comment, WD_FILES_COMMENT_SEPARATOR);1232 wi_file_write_format(tmpfile, WI_STR("%#@%s%#@%s"), 1233 name, WD_FILES_COMMENT_FIELD_SEPARATOR, 1234 comment, WD_FILES_COMMENT_SEPARATOR); 1235 1235 comments++; 1236 1236 } … … 1238 1238 while(wd_files_read_comment(file, &eachname, &eachcomment)) { 1239 1239 if(!wi_is_equal(name, eachname)) { 1240 wi_file_write (tmpfile, WI_STR("%#@%s%#@%s"),1241 eachname, WD_FILES_COMMENT_FIELD_SEPARATOR,1242 eachcomment, WD_FILES_COMMENT_SEPARATOR);1240 wi_file_write_format(tmpfile, WI_STR("%#@%s%#@%s"), 1241 eachname, WD_FILES_COMMENT_FIELD_SEPARATOR, 1242 eachcomment, WD_FILES_COMMENT_SEPARATOR); 1243 1243 } 1244 1244 … … 1251 1251 1252 1252 while((string = wi_file_read(tmpfile, WI_FILE_BUFFER_SIZE))) 1253 wi_file_write (file, WI_STR("%@"), string);1253 wi_file_write_format(file, WI_STR("%@"), string); 1254 1254 1255 1255 wi_file_close(file); wired/trunk/wired/news.c
r4750 r5388 107 107 news); 108 108 109 wi_file_write (tmpfile, WI_STR("%#@%s"), post, WD_NEWS_SEPARATOR);109 wi_file_write_format(tmpfile, WI_STR("%#@%s"), post, WD_NEWS_SEPARATOR); 110 110 111 111 while((string = wi_file_read(file, WI_FILE_BUFFER_SIZE))) 112 wi_file_write (tmpfile, WI_STR("%@"), string);112 wi_file_write_format(tmpfile, WI_STR("%@"), string); 113 113 114 114 wi_file_truncate(file, 0); … … 119 119 while((string = wi_file_read_to_string(tmpfile, separator))) { 120 120 if(!first) 121 wi_file_write (file, WI_STR("%s"), WD_NEWS_SEPARATOR);121 wi_file_write_format(file, WI_STR("%s"), WD_NEWS_SEPARATOR); 122 122 123 wi_file_write (file, WI_STR("%@"), string);123 wi_file_write_format(file, WI_STR("%@"), string); 124 124 125 125 first = false;
