Last of src directory *.c checked for T stuff. Only subdirectories left.
@@ -1,11 +1,8 @@ | ||
1 | 1 | /* テスト */ |
2 | -/* | |
3 | - * Debug Status: Functions in this file need updating to support kanji | |
4 | - * display. | |
5 | - * - Term_queue_chars is being worked on. | |
6 | - * - attribute flag usage is being examined. | |
2 | +/* | |
3 | + * Debug Status: Working, but with hacks that cause glitches. | |
4 | + * - Fixed __T on this page (none present). | |
7 | 5 | */ |
8 | - | |
9 | 6 | /* |
10 | 7 | * File: z-term.c |
11 | 8 | * Purpose: a generic, efficient, terminal window package |
@@ -2132,7 +2129,6 @@ | ||
2132 | 2129 | /* Save the contents */ |
2133 | 2130 | term_win_copy(Term->mem, hold_mem, wid, hgt); |
2134 | 2131 | } |
2135 | - | |
2136 | 2132 | /* If needed */ |
2137 | 2133 | if (hold_tmp) |
2138 | 2134 | { |
@@ -2145,7 +2141,6 @@ | ||
2145 | 2141 | /* Save the contents */ |
2146 | 2142 | term_win_copy(Term->tmp, hold_tmp, wid, hgt); |
2147 | 2143 | } |
2148 | - | |
2149 | 2144 | /* Free some arrays */ |
2150 | 2145 | FREE(hold_x1); |
2151 | 2146 | FREE(hold_x2); |
@@ -2189,7 +2184,6 @@ | ||
2189 | 2184 | if (Term->mem->cy >= h) |
2190 | 2185 | Term->mem->cu = 1; |
2191 | 2186 | } |
2192 | - | |
2193 | 2187 | /* If needed */ |
2194 | 2188 | if (hold_tmp) |
2195 | 2189 | { |
@@ -2205,7 +2199,6 @@ | ||
2205 | 2199 | if (Term->tmp->cy >= h) |
2206 | 2200 | Term->tmp->cu = 1; |
2207 | 2201 | } |
2208 | - | |
2209 | 2202 | /* Save new size */ |
2210 | 2203 | Term->wid = w; |
2211 | 2204 | Term->hgt = h; |
@@ -2220,7 +2213,6 @@ | ||
2220 | 2213 | Term->x1[i] = 0; |
2221 | 2214 | Term->x2[i] = w - 1; |
2222 | 2215 | } |
2223 | - | |
2224 | 2216 | /* Assume change */ |
2225 | 2217 | Term->y1 = 0; |
2226 | 2218 | Term->y2 = h - 1; |
@@ -2261,7 +2253,6 @@ | ||
2261 | 2253 | /* Assume mapped */ |
2262 | 2254 | t->mapped_flag = TRUE; |
2263 | 2255 | } |
2264 | - | |
2265 | 2256 | /* Remember the Term */ |
2266 | 2257 | Term = t; |
2267 | 2258 |
@@ -2289,7 +2280,6 @@ | ||
2289 | 2280 | /* Assume not mapped */ |
2290 | 2281 | t->mapped_flag = FALSE; |
2291 | 2282 | } |
2292 | - | |
2293 | 2283 | /* Nuke "displayed" */ |
2294 | 2284 | term_win_nuke(t->old); |
2295 | 2285 |
@@ -2311,7 +2301,6 @@ | ||
2311 | 2301 | /* Kill "memorized" */ |
2312 | 2302 | FREE(t->mem); |
2313 | 2303 | } |
2314 | - | |
2315 | 2304 | /* If needed */ |
2316 | 2305 | if (t->tmp) |
2317 | 2306 | { |
@@ -2321,7 +2310,6 @@ | ||
2321 | 2310 | /* Kill "temporary" */ |
2322 | 2311 | FREE(t->tmp); |
2323 | 2312 | } |
2324 | - | |
2325 | 2313 | /* Free some arrays */ |
2326 | 2314 | FREE(t->x1); |
2327 | 2315 | FREE(t->x2); |
@@ -2382,7 +2370,6 @@ | ||
2382 | 2370 | t->x1[y] = 0; |
2383 | 2371 | t->x2[y] = w - 1; |
2384 | 2372 | } |
2385 | - | |
2386 | 2373 | /* Assume change */ |
2387 | 2374 | t->y1 = 0; |
2388 | 2375 | t->y2 = h - 1; |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Not checked. | |
4 | + * - Fixed __T on this page (none present). | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: z-quark.c |
4 | 8 | * Purpose: Save memory by storing strings in a global array, ensuring |
5 | 9 | * that each is only allocated once. |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Not checked. | |
4 | + * - Fixed __T on this page (none present). | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: z-rand.c |
4 | 8 | * Purpose: A simple RNG for Angband |
5 | 9 | * |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Not checked. | |
4 | + * - Fixed __T on this page. | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: z-virt.c |
4 | 8 | * Purpose: Memory management routines |
5 | 9 | * |
@@ -71,7 +75,7 @@ | ||
71 | 75 | |
72 | 76 | /* Handle OOM */ |
73 | 77 | if (!mem) |
74 | - quit(L"Out of Memory!"); | |
78 | + quit(__T("Out of Memory!")); | |
75 | 79 | |
76 | 80 | return mem; |
77 | 81 | } |
@@ -118,7 +122,7 @@ | ||
118 | 122 | else mem = realloc(p, len); |
119 | 123 | |
120 | 124 | /* Handle OOM */ |
121 | - if (!mem) quit(L"Out of Memory!"); | |
125 | + if (!mem) quit(__T("Out of Memory!")); | |
122 | 126 | |
123 | 127 | return mem; |
124 | 128 | } |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Started checking from here (the beginning). | |
4 | + * - Fixed __T on this page. | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: wizard2.c |
4 | 8 | * Purpose: Debug mode commands |
5 | 9 | * |
@@ -166,10 +170,10 @@ | ||
166 | 170 | for (i = 0; i < A_MAX; i++) |
167 | 171 | { |
168 | 172 | /* Prompt */ |
169 | - strnfmt(ppp, _countof(ppp), L"%s (3-118): ", stat_names[i]); | |
173 | + strnfmt(ppp, _countof(ppp), __T("%s (3-118): "), stat_names[i]); | |
170 | 174 | |
171 | 175 | /* Default */ |
172 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", p_ptr->stat_max[i]); | |
176 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), p_ptr->stat_max[i]); | |
173 | 177 | |
174 | 178 | /* Query */ |
175 | 179 | if (!get_string(ppp, tmp_val, 4)) return; |
@@ -185,10 +189,10 @@ | ||
185 | 189 | p_ptr->stat_cur[i] = p_ptr->stat_max[i] = tmp_int; |
186 | 190 | } |
187 | 191 | /* Default */ |
188 | - strnfmt(tmp_val, _countof(tmp_val), L"%ld", (long)(p_ptr->au)); | |
192 | + strnfmt(tmp_val, _countof(tmp_val), __T("%ld"), (long)(p_ptr->au)); | |
189 | 193 | |
190 | 194 | /* Query */ |
191 | - if (!get_string(L"Gold: ", tmp_val, 10)) return; | |
195 | + if (!get_string(__T("Gold: "), tmp_val, 10)) return; | |
192 | 196 | |
193 | 197 | /* Extract */ |
194 | 198 | tmp_long = _tstol(tmp_val); |
@@ -200,10 +204,10 @@ | ||
200 | 204 | p_ptr->au = tmp_long; |
201 | 205 | |
202 | 206 | /* Default */ |
203 | - strnfmt(tmp_val, _countof(tmp_val), L"%ld", (long)(p_ptr->exp)); | |
207 | + strnfmt(tmp_val, _countof(tmp_val), __T("%ld"), (long)(p_ptr->exp)); | |
204 | 208 | |
205 | 209 | /* Query */ |
206 | - if (!get_string(L"Experience: ", tmp_val, 10)) return; | |
210 | + if (!get_string(__T("Experience: "), tmp_val, 10)) return; | |
207 | 211 | |
208 | 212 | /* Extract */ |
209 | 213 | tmp_long = _tstol(tmp_val); |
@@ -218,10 +222,11 @@ | ||
218 | 222 | check_experience(); |
219 | 223 | |
220 | 224 | /* Default */ |
221 | - strnfmt(tmp_val, _countof(tmp_val), L"%ld", (long)(p_ptr->max_exp)); | |
225 | + strnfmt(tmp_val, _countof(tmp_val), __T("%ld"), (long)(p_ptr->max_exp)); | |
222 | 226 | |
223 | 227 | /* Query */ |
224 | - if (!get_string(L"Max Exp: ", tmp_val, 10)) return; | |
228 | + if (!get_string(__T("Max Exp: "), tmp_val, 10)) | |
229 | + return; | |
225 | 230 | |
226 | 231 | /* Extract */ |
227 | 232 | tmp_long = _tstol(tmp_val); |
@@ -378,41 +383,41 @@ | ||
378 | 383 | */ |
379 | 384 | static const tval_desc tvals[] = |
380 | 385 | { |
381 | - { TV_SWORD, L"Sword" }, | |
382 | - { TV_POLEARM, L"Polearm" }, | |
383 | - { TV_HAFTED, L"Hafted Weapon" }, | |
384 | - { TV_BOW, L"Bow" }, | |
385 | - { TV_ARROW, L"Arrows" }, | |
386 | - { TV_BOLT, L"Bolts" }, | |
387 | - { TV_SHOT, L"Shots" }, | |
388 | - { TV_SHIELD, L"Shield" }, | |
389 | - { TV_CROWN, L"Crown" }, | |
390 | - { TV_HELM, L"Helm" }, | |
391 | - { TV_GLOVES, L"Gloves" }, | |
392 | - { TV_BOOTS, L"Boots" }, | |
393 | - { TV_CLOAK, L"Cloak" }, | |
394 | - { TV_DRAG_ARMOR, L"Dragon Scale Mail" }, | |
395 | - { TV_HARD_ARMOR, L"Hard Armor" }, | |
396 | - { TV_SOFT_ARMOR, L"Soft Armor" }, | |
397 | - { TV_RING, L"Ring" }, | |
398 | - { TV_AMULET, L"Amulet" }, | |
399 | - { TV_LITE, L"Lite" }, | |
400 | - { TV_POTION, L"Potion" }, | |
401 | - { TV_SCROLL, L"Scroll" }, | |
402 | - { TV_WAND, L"Wand" }, | |
403 | - { TV_STAFF, L"Staff" }, | |
404 | - { TV_ROD, L"Rod" }, | |
405 | - { TV_PRAYER_BOOK, L"Priest Book" }, | |
406 | - { TV_MAGIC_BOOK, L"Magic Book" }, | |
407 | - { TV_SPIKE, L"Spikes" }, | |
408 | - { TV_DIGGING, L"Digger" }, | |
409 | - { TV_CHEST, L"Chest" }, | |
410 | - { TV_FOOD, L"Food" }, | |
411 | - { TV_FLASK, L"Flask" }, | |
412 | - { TV_SKELETON, L"Skeletons" }, | |
413 | - { TV_BOTTLE, L"Empty bottle" }, | |
414 | - { TV_JUNK, L"Junk" }, | |
415 | - { TV_GOLD, L"Gold" }, | |
386 | + { TV_SWORD, __T("Sword") }, | |
387 | + { TV_POLEARM, __T("Polearm") }, | |
388 | + { TV_HAFTED, __T("Hafted Weapon") }, | |
389 | + { TV_BOW, __T("Bow") }, | |
390 | + { TV_ARROW, __T("Arrows") }, | |
391 | + { TV_BOLT, __T("Bolts") }, | |
392 | + { TV_SHOT, __T("Shots") }, | |
393 | + { TV_SHIELD, __T("Shield") }, | |
394 | + { TV_CROWN, __T("Crown") }, | |
395 | + { TV_HELM, __T("Helm") }, | |
396 | + { TV_GLOVES, __T("Gloves") }, | |
397 | + { TV_BOOTS, __T("Boots") }, | |
398 | + { TV_CLOAK, __T("Cloak") }, | |
399 | + { TV_DRAG_ARMOR, __T("Dragon Scale Mail") }, | |
400 | + { TV_HARD_ARMOR, __T("Hard Armor") }, | |
401 | + { TV_SOFT_ARMOR, __T("Soft Armor") }, | |
402 | + { TV_RING, __T("Ring") }, | |
403 | + { TV_AMULET, __T("Amulet") }, | |
404 | + { TV_LITE, __T("Lite") }, | |
405 | + { TV_POTION, __T("Potion") }, | |
406 | + { TV_SCROLL, __T("Scroll") }, | |
407 | + { TV_WAND, __T("Wand") }, | |
408 | + { TV_STAFF, __T("Staff") }, | |
409 | + { TV_ROD, __T("Rod") }, | |
410 | + { TV_PRAYER_BOOK, __T("Priest Book") }, | |
411 | + { TV_MAGIC_BOOK, __T("Magic Book") }, | |
412 | + { TV_SPIKE, __T("Spikes") }, | |
413 | + { TV_DIGGING, __T("Digger") }, | |
414 | + { TV_CHEST, __T("Chest") }, | |
415 | + { TV_FOOD, __T("Food") }, | |
416 | + { TV_FLASK, __T("Flask") }, | |
417 | + { TV_SKELETON, __T("Skeletons") }, | |
418 | + { TV_BOTTLE, __T("Empty bottle") }, | |
419 | + { TV_JUNK, __T("Junk") }, | |
420 | + { TV_GOLD, __T("Gold") }, | |
416 | 421 | { 0, NULL } |
417 | 422 | }; |
418 | 423 |
@@ -453,7 +458,7 @@ | ||
453 | 458 | max_num = num; |
454 | 459 | |
455 | 460 | /* Choose! */ |
456 | - if (!get_com(L"Get what type of object? ", &ch)) return (0); | |
461 | + if (!get_com(__T("Get what type of object? "), &ch)) return (0); | |
457 | 462 | |
458 | 463 | /* Analyze choice */ |
459 | 464 | num = -1; |
@@ -529,29 +534,29 @@ | ||
529 | 534 | if (artifact_p(o_ptr)) |
530 | 535 | return; |
531 | 536 | |
532 | - p = L"Enter new 'pval' setting: "; | |
533 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", o_ptr->pval); | |
537 | + p = __T("Enter new 'pval' setting: "); | |
538 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), o_ptr->pval); | |
534 | 539 | if (!get_string(p, tmp_val, 6)) |
535 | 540 | return; |
536 | 541 | o_ptr->pval = _tstoi(tmp_val); |
537 | 542 | wiz_display_item(o_ptr); |
538 | 543 | |
539 | - p = L"Enter new 'to_a' setting: "; | |
540 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", o_ptr->to_a); | |
544 | + p = __T("Enter new 'to_a' setting: "); | |
545 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), o_ptr->to_a); | |
541 | 546 | if (!get_string(p, tmp_val, 6)) |
542 | 547 | return; |
543 | 548 | o_ptr->to_a = _tstoi(tmp_val); |
544 | 549 | wiz_display_item(o_ptr); |
545 | 550 | |
546 | - p = L"Enter new 'to_h' setting: "; | |
547 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", o_ptr->to_h); | |
551 | + p = __T("Enter new 'to_h' setting: "); | |
552 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), o_ptr->to_h); | |
548 | 553 | if (!get_string(p, tmp_val, 6)) |
549 | 554 | return; |
550 | 555 | o_ptr->to_h = _tstoi(tmp_val); |
551 | 556 | wiz_display_item(o_ptr); |
552 | 557 | |
553 | - p = L"Enter new 'to_d' setting: "; | |
554 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", o_ptr->to_d); | |
558 | + p = __T("Enter new 'to_d' setting: "); | |
559 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), o_ptr->to_d); | |
555 | 560 | if (!get_string(p, tmp_val, 6)) |
556 | 561 | return; |
557 | 562 | o_ptr->to_d = _tstoi(tmp_val); |
@@ -587,7 +592,7 @@ | ||
587 | 592 | wiz_display_item(i_ptr); |
588 | 593 | |
589 | 594 | /* Ask wizard what to do. */ |
590 | - if (!get_com(L"[a]ccept, [n]ormal, [g]ood, [e]xcellent? ", &ch)) | |
595 | + if (!get_com(__T("[a]ccept, [n]ormal, [g]ood, [e]xcellent? "), &ch)) | |
591 | 596 | break; |
592 | 597 | |
593 | 598 | /* Create/change it! */ |
@@ -676,7 +681,7 @@ | ||
676 | 681 | /* Interact */ |
677 | 682 | while (TRUE) |
678 | 683 | { |
679 | - const _TCHAR *pmt = L"Roll for [n]ormal, [g]ood, or [e]xcellent treasure? "; | |
684 | + const _TCHAR *pmt = __T("Roll for [n]ormal, [g]ood, or [e]xcellent treasure? "); | |
680 | 685 | |
681 | 686 | /* Display item */ |
682 | 687 | wiz_display_item(o_ptr); |
@@ -688,19 +693,19 @@ | ||
688 | 693 | { |
689 | 694 | good = FALSE; |
690 | 695 | great = FALSE; |
691 | - quality = L"normal"; | |
696 | + quality = __T("normal"); | |
692 | 697 | } |
693 | 698 | else if (ch == 'g' || ch == 'G') |
694 | 699 | { |
695 | 700 | good = TRUE; |
696 | 701 | great = FALSE; |
697 | - quality = L"good"; | |
702 | + quality = __T("good"); | |
698 | 703 | } |
699 | 704 | else if (ch == 'e' || ch == 'E') |
700 | 705 | { |
701 | 706 | good = TRUE; |
702 | 707 | great = TRUE; |
703 | - quality = L"excellent"; | |
708 | + quality = __T("excellent"); | |
704 | 709 | } |
705 | 710 | else |
706 | 711 | { |
@@ -813,10 +818,10 @@ | ||
813 | 818 | return; |
814 | 819 | |
815 | 820 | /* Default */ |
816 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", o_ptr->number); | |
821 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), o_ptr->number); | |
817 | 822 | |
818 | 823 | /* Query */ |
819 | - if (get_string(L"Quantity: ", tmp_val, 3)) | |
824 | + if (get_string(__T("Quantity: "), tmp_val, 3)) | |
820 | 825 | { |
821 | 826 | /* Extract */ |
822 | 827 | tmp_int = _tstoi(tmp_val); |
@@ -856,11 +861,11 @@ | ||
856 | 861 | msg_print(__T("Resetting existing curses.")); |
857 | 862 | o_ptr->flags[2] &= ~TR2_CURSE_MASK; |
858 | 863 | } |
859 | - if (get_check(L"Set light curse? ")) | |
864 | + if (get_check(__T("Set light curse? "))) | |
860 | 865 | o_ptr->flags[2] |= TR2_LIGHT_CURSE; |
861 | - else if (get_check(L"Set heavy curse? ")) | |
866 | + else if (get_check(__T("Set heavy curse? "))) | |
862 | 867 | o_ptr->flags[2] |= (TR2_LIGHT_CURSE | TR2_HEAVY_CURSE); |
863 | - else if (get_check(L"Set permanent curse? ")) | |
868 | + else if (get_check(__T("Set permanent curse? "))) | |
864 | 869 | o_ptr->flags[2] |= (TR2_LIGHT_CURSE | TR2_HEAVY_CURSE | TR2_PERMA_CURSE); |
865 | 870 | } |
866 | 871 |
@@ -911,7 +916,7 @@ | ||
911 | 916 | wiz_display_item(i_ptr); |
912 | 917 | |
913 | 918 | /* Get choice */ |
914 | - if (!get_com(L"[a]ccept [s]tatistics [r]eroll [t]weak [c]urse [q]uantity? ", &ch)) | |
919 | + if (!get_com(__T("[a]ccept [s]tatistics [r]eroll [t]weak [c]urse [q]uantity? "), &ch)) | |
915 | 920 | break; |
916 | 921 | |
917 | 922 | if (ch == 'A' || ch == 'a') |
@@ -1134,10 +1139,10 @@ | ||
1134 | 1139 | _TCHAR tmp_val[160]; |
1135 | 1140 | |
1136 | 1141 | /* Prompt */ |
1137 | - strnfmt(ppp, _countof(ppp), L"Jump to level (0-%d): ", MAX_DEPTH-1); | |
1142 | + strnfmt(ppp, _countof(ppp), __T("Jump to level (0-%d): "), MAX_DEPTH-1); | |
1138 | 1143 | |
1139 | 1144 | /* Default */ |
1140 | - strnfmt(tmp_val, _countof(tmp_val), L"%d", p_ptr->depth); | |
1145 | + strnfmt(tmp_val, _countof(tmp_val), __T("%d"), p_ptr->depth); | |
1141 | 1146 | |
1142 | 1147 | /* Ask for a level */ |
1143 | 1148 | if (!get_string(ppp, tmp_val, 11)) return; |
@@ -1360,7 +1365,7 @@ | ||
1360 | 1365 | u16b mask = 0x00; |
1361 | 1366 | |
1362 | 1367 | /* Get a "debug command" */ |
1363 | - if (!get_com(L"Debug Command Query: ", &cmd)) | |
1368 | + if (!get_com(__T("Debug Command Query: "), &cmd)) | |
1364 | 1369 | return; |
1365 | 1370 | |
1366 | 1371 | /* Extract a flag */ |
@@ -1471,7 +1476,7 @@ | ||
1471 | 1476 | static void do_cmd_wiz_help(void) |
1472 | 1477 | { |
1473 | 1478 | _TCHAR buf[80]; |
1474 | - strnfmt(buf, _countof(buf), L"debug.txt"); | |
1479 | + strnfmt(buf, _countof(buf), __T("debug.txt")); | |
1475 | 1480 | screen_save(); |
1476 | 1481 | show_file(buf, NULL, 0, 0); |
1477 | 1482 | screen_load(); |
@@ -1490,7 +1495,7 @@ | ||
1490 | 1495 | _TCHAR cmd; |
1491 | 1496 | |
1492 | 1497 | /* Get a "debug command" */ |
1493 | - if (!get_com(L"Debug Command: ", &cmd)) | |
1498 | + if (!get_com(__T("Debug Command: "), &cmd)) | |
1494 | 1499 | return; |
1495 | 1500 | |
1496 | 1501 | /* Analyze the command */ |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Not checked. | |
4 | + * - Fixed __T on this page (none present). | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: z-type.cpp |
4 | 8 | * Purpose: |
5 | 9 | * |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Not checked. | |
4 | + * - Fixed __T on this page (none present). | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: z-msg.c |
4 | 8 | * Purpose: Message handling |
5 | 9 | * |
@@ -1,5 +1,9 @@ | ||
1 | 1 | /* テスト */ |
2 | 2 | /* |
3 | + * Debug Status: Not checked. | |
4 | + * - Fixed __T on this page. | |
5 | + */ | |
6 | +/* | |
3 | 7 | * File: z-file.c |
4 | 8 | * Purpose: Low-level file (and directory) handling |
5 | 9 | * |
@@ -71,12 +75,12 @@ | ||
71 | 75 | # if defined(HAVE_SETRESGID) |
72 | 76 | |
73 | 77 | if (setresgid(-1, getgid(), -1) != 0) |
74 | - quit(L"setegid(): cannot drop permissions correctly!"); | |
78 | + quit(__T("setegid(): cannot drop permissions correctly!")); | |
75 | 79 | |
76 | 80 | # else |
77 | 81 | |
78 | 82 | if (setegid(getgid()) != 0) |
79 | - quit(L"setegid(): cannot drop permissions correctly!"); | |
83 | + quit(__T("setegid(): cannot drop permissions correctly!")); | |
80 | 84 | |
81 | 85 | # endif |
82 | 86 | #endif /* SET_UID */ |
@@ -91,12 +95,12 @@ | ||
91 | 95 | # if defined(HAVE_SETRESGID) |
92 | 96 | |
93 | 97 | if (setresgid(-1, player_egid, -1) != 0) |
94 | - quit(L"setegid(): cannot grab permissions correctly!"); | |
98 | + quit(__T("setegid(): cannot grab permissions correctly!")); | |
95 | 99 | |
96 | 100 | # elif defined(HAVE_SETEGID) |
97 | 101 | |
98 | 102 | if (setegid(player_egid) != 0) |
99 | - quit(L"setegid(): cannot grab permissions correctly!"); | |
103 | + quit(__T("setegid(): cannot grab permissions correctly!")); | |
100 | 104 | |
101 | 105 | # endif |
102 | 106 | #endif /* SET_UID */ |
@@ -171,8 +175,8 @@ | ||
171 | 175 | if (!pw) return; |
172 | 176 | |
173 | 177 | /* Copy across */ |
174 | - strnfcat(buf, len, cur_len, L"%s%s", pw->pw_dir, PATH_SEP); | |
175 | - if (s) strnfcat(buf, len, cur_len, L"%s", s); | |
178 | + strnfcat(buf, len, cur_len, __T("%s%s"), pw->pw_dir, PATH_SEP); | |
179 | + if (s) strnfcat(buf, len, cur_len, __T("%s"), s); | |
176 | 180 | } |
177 | 181 | else |
178 | 182 |
@@ -179,7 +183,7 @@ | ||
179 | 183 | #endif |
180 | 184 | |
181 | 185 | { |
182 | - strnfcat(buf, len, cur_len, L"%s", path); | |
186 | + strnfcat(buf, len, cur_len, __T("%s"), path); | |
183 | 187 | } |
184 | 188 | } |
185 | 189 |
@@ -234,8 +238,8 @@ | ||
234 | 238 | if (!pw) return; |
235 | 239 | |
236 | 240 | /* Copy across */ |
237 | - strnfcat(buf, len, cur_len, L"%s%s", pw->pw_dir, PATH_SEP); | |
238 | - if (s) strnfcat(buf, len, cur_len, L"%s", s); | |
241 | + strnfcat(buf, len, cur_len, __T("%s%s"), pw->pw_dir, PATH_SEP); | |
242 | + if (s) strnfcat(buf, len, cur_len, __T("%s"), s); | |
239 | 243 | } |
240 | 244 | else |
241 | 245 |
@@ -242,7 +246,7 @@ | ||
242 | 246 | #endif |
243 | 247 | |
244 | 248 | { |
245 | - strnfcat(buf, len, cur_len, L"%s", path); | |
249 | + strnfcat(buf, len, cur_len, __T("%s"), path); | |
246 | 250 | } |
247 | 251 | } |
248 | 252 | #endif |
@@ -285,7 +289,7 @@ | ||
285 | 289 | } |
286 | 290 | /* There is both a relative leafname and a base path from which it is relative */ |
287 | 291 | path_process(buf, len, &cur_len, base); |
288 | - strnfcat(buf, len, &cur_len, L"%s", PATH_SEP); | |
292 | + strnfcat(buf, len, &cur_len, __T("%s"), PATH_SEP); | |
289 | 293 | path_process(buf, len, &cur_len, leaf); |
290 | 294 | |
291 | 295 | return cur_len; |
@@ -323,7 +327,7 @@ | ||
323 | 327 | |
324 | 328 | /* There is both a relative leafname and a base path from which it is relative */ |
325 | 329 | path_process(buf, len, &cur_len, base); |
326 | - strnfcat(buf, len, &cur_len, L"%s", PATH_SEP); | |
330 | + strnfcat(buf, len, &cur_len, __T("%s"), PATH_SEP); | |
327 | 331 | path_process(buf, len, &cur_len, leaf); |
328 | 332 | |
329 | 333 | return cur_len; |
@@ -510,7 +514,7 @@ | ||
510 | 514 | modestr = __T("rb"); |
511 | 515 | break; |
512 | 516 | default: |
513 | - quit(L"Invalid mode value in file_open()!"); | |
517 | + quit(__T("Invalid mode value in file_open()!")); | |
514 | 518 | break; |
515 | 519 | } |
516 | 520 |
@@ -951,8 +955,8 @@ | ||
951 | 955 | |
952 | 956 | /* Skip directories */ |
953 | 957 | if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY || |
954 | - _tcscmp(fd.cFileName, L".") == 0 || | |
955 | - _tcscmp(fd.cFileName, L"..") == 0) | |
958 | + _tcscmp(fd.cFileName, __T(".")) == 0 || | |
959 | + _tcscmp(fd.cFileName, __T("..")) == 0) | |
956 | 960 | continue; |
957 | 961 | |
958 | 962 | /* Take this one */ |