• R/O
  • SSH
  • HTTPS

jband: Commit


Commit MetaInfo

Revision123 (tree)
Time2009-06-25 20:53:37
Authorpaulblay

Log Message

Last of src directory *.c checked for T stuff. Only subdirectories left.

Change Summary

Incremental Difference

--- trunk/JBand/src/z-term.cpp (revision 122)
+++ trunk/JBand/src/z-term.cpp (revision 123)
@@ -1,11 +1,8 @@
11 /* テスト */
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).
75 */
8-
96 /*
107 * File: z-term.c
118 * Purpose: a generic, efficient, terminal window package
@@ -2132,7 +2129,6 @@
21322129 /* Save the contents */
21332130 term_win_copy(Term->mem, hold_mem, wid, hgt);
21342131 }
2135-
21362132 /* If needed */
21372133 if (hold_tmp)
21382134 {
@@ -2145,7 +2141,6 @@
21452141 /* Save the contents */
21462142 term_win_copy(Term->tmp, hold_tmp, wid, hgt);
21472143 }
2148-
21492144 /* Free some arrays */
21502145 FREE(hold_x1);
21512146 FREE(hold_x2);
@@ -2189,7 +2184,6 @@
21892184 if (Term->mem->cy >= h)
21902185 Term->mem->cu = 1;
21912186 }
2192-
21932187 /* If needed */
21942188 if (hold_tmp)
21952189 {
@@ -2205,7 +2199,6 @@
22052199 if (Term->tmp->cy >= h)
22062200 Term->tmp->cu = 1;
22072201 }
2208-
22092202 /* Save new size */
22102203 Term->wid = w;
22112204 Term->hgt = h;
@@ -2220,7 +2213,6 @@
22202213 Term->x1[i] = 0;
22212214 Term->x2[i] = w - 1;
22222215 }
2223-
22242216 /* Assume change */
22252217 Term->y1 = 0;
22262218 Term->y2 = h - 1;
@@ -2261,7 +2253,6 @@
22612253 /* Assume mapped */
22622254 t->mapped_flag = TRUE;
22632255 }
2264-
22652256 /* Remember the Term */
22662257 Term = t;
22672258
@@ -2289,7 +2280,6 @@
22892280 /* Assume not mapped */
22902281 t->mapped_flag = FALSE;
22912282 }
2292-
22932283 /* Nuke "displayed" */
22942284 term_win_nuke(t->old);
22952285
@@ -2311,7 +2301,6 @@
23112301 /* Kill "memorized" */
23122302 FREE(t->mem);
23132303 }
2314-
23152304 /* If needed */
23162305 if (t->tmp)
23172306 {
@@ -2321,7 +2310,6 @@
23212310 /* Kill "temporary" */
23222311 FREE(t->tmp);
23232312 }
2324-
23252313 /* Free some arrays */
23262314 FREE(t->x1);
23272315 FREE(t->x2);
@@ -2382,7 +2370,6 @@
23822370 t->x1[y] = 0;
23832371 t->x2[y] = w - 1;
23842372 }
2385-
23862373 /* Assume change */
23872374 t->y1 = 0;
23882375 t->y2 = h - 1;
--- trunk/JBand/src/z-quark.cpp (revision 122)
+++ trunk/JBand/src/z-quark.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page (none present).
5+ */
6+/*
37 * File: z-quark.c
48 * Purpose: Save memory by storing strings in a global array, ensuring
59 * that each is only allocated once.
--- trunk/JBand/src/z-rand.cpp (revision 122)
+++ trunk/JBand/src/z-rand.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page (none present).
5+ */
6+/*
37 * File: z-rand.c
48 * Purpose: A simple RNG for Angband
59 *
--- trunk/JBand/src/z-virt.cpp (revision 122)
+++ trunk/JBand/src/z-virt.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: z-virt.c
48 * Purpose: Memory management routines
59 *
@@ -71,7 +75,7 @@
7175
7276 /* Handle OOM */
7377 if (!mem)
74- quit(L"Out of Memory!");
78+ quit(__T("Out of Memory!"));
7579
7680 return mem;
7781 }
@@ -118,7 +122,7 @@
118122 else mem = realloc(p, len);
119123
120124 /* Handle OOM */
121- if (!mem) quit(L"Out of Memory!");
125+ if (!mem) quit(__T("Out of Memory!"));
122126
123127 return mem;
124128 }
--- trunk/JBand/src/wizard.cpp (revision 122)
+++ trunk/JBand/src/wizard.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Started checking from here (the beginning).
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: wizard2.c
48 * Purpose: Debug mode commands
59 *
@@ -166,10 +170,10 @@
166170 for (i = 0; i < A_MAX; i++)
167171 {
168172 /* 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]);
170174
171175 /* 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]);
173177
174178 /* Query */
175179 if (!get_string(ppp, tmp_val, 4)) return;
@@ -185,10 +189,10 @@
185189 p_ptr->stat_cur[i] = p_ptr->stat_max[i] = tmp_int;
186190 }
187191 /* 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));
189193
190194 /* Query */
191- if (!get_string(L"Gold: ", tmp_val, 10)) return;
195+ if (!get_string(__T("Gold: "), tmp_val, 10)) return;
192196
193197 /* Extract */
194198 tmp_long = _tstol(tmp_val);
@@ -200,10 +204,10 @@
200204 p_ptr->au = tmp_long;
201205
202206 /* 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));
204208
205209 /* Query */
206- if (!get_string(L"Experience: ", tmp_val, 10)) return;
210+ if (!get_string(__T("Experience: "), tmp_val, 10)) return;
207211
208212 /* Extract */
209213 tmp_long = _tstol(tmp_val);
@@ -218,10 +222,11 @@
218222 check_experience();
219223
220224 /* 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));
222226
223227 /* Query */
224- if (!get_string(L"Max Exp: ", tmp_val, 10)) return;
228+ if (!get_string(__T("Max Exp: "), tmp_val, 10))
229+ return;
225230
226231 /* Extract */
227232 tmp_long = _tstol(tmp_val);
@@ -378,41 +383,41 @@
378383 */
379384 static const tval_desc tvals[] =
380385 {
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") },
416421 { 0, NULL }
417422 };
418423
@@ -453,7 +458,7 @@
453458 max_num = num;
454459
455460 /* 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);
457462
458463 /* Analyze choice */
459464 num = -1;
@@ -529,29 +534,29 @@
529534 if (artifact_p(o_ptr))
530535 return;
531536
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);
534539 if (!get_string(p, tmp_val, 6))
535540 return;
536541 o_ptr->pval = _tstoi(tmp_val);
537542 wiz_display_item(o_ptr);
538543
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);
541546 if (!get_string(p, tmp_val, 6))
542547 return;
543548 o_ptr->to_a = _tstoi(tmp_val);
544549 wiz_display_item(o_ptr);
545550
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);
548553 if (!get_string(p, tmp_val, 6))
549554 return;
550555 o_ptr->to_h = _tstoi(tmp_val);
551556 wiz_display_item(o_ptr);
552557
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);
555560 if (!get_string(p, tmp_val, 6))
556561 return;
557562 o_ptr->to_d = _tstoi(tmp_val);
@@ -587,7 +592,7 @@
587592 wiz_display_item(i_ptr);
588593
589594 /* 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))
591596 break;
592597
593598 /* Create/change it! */
@@ -676,7 +681,7 @@
676681 /* Interact */
677682 while (TRUE)
678683 {
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? ");
680685
681686 /* Display item */
682687 wiz_display_item(o_ptr);
@@ -688,19 +693,19 @@
688693 {
689694 good = FALSE;
690695 great = FALSE;
691- quality = L"normal";
696+ quality = __T("normal");
692697 }
693698 else if (ch == 'g' || ch == 'G')
694699 {
695700 good = TRUE;
696701 great = FALSE;
697- quality = L"good";
702+ quality = __T("good");
698703 }
699704 else if (ch == 'e' || ch == 'E')
700705 {
701706 good = TRUE;
702707 great = TRUE;
703- quality = L"excellent";
708+ quality = __T("excellent");
704709 }
705710 else
706711 {
@@ -813,10 +818,10 @@
813818 return;
814819
815820 /* 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);
817822
818823 /* Query */
819- if (get_string(L"Quantity: ", tmp_val, 3))
824+ if (get_string(__T("Quantity: "), tmp_val, 3))
820825 {
821826 /* Extract */
822827 tmp_int = _tstoi(tmp_val);
@@ -856,11 +861,11 @@
856861 msg_print(__T("Resetting existing curses."));
857862 o_ptr->flags[2] &= ~TR2_CURSE_MASK;
858863 }
859- if (get_check(L"Set light curse? "))
864+ if (get_check(__T("Set light curse? ")))
860865 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? ")))
862867 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? ")))
864869 o_ptr->flags[2] |= (TR2_LIGHT_CURSE | TR2_HEAVY_CURSE | TR2_PERMA_CURSE);
865870 }
866871
@@ -911,7 +916,7 @@
911916 wiz_display_item(i_ptr);
912917
913918 /* 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))
915920 break;
916921
917922 if (ch == 'A' || ch == 'a')
@@ -1134,10 +1139,10 @@
11341139 _TCHAR tmp_val[160];
11351140
11361141 /* 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);
11381143
11391144 /* 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);
11411146
11421147 /* Ask for a level */
11431148 if (!get_string(ppp, tmp_val, 11)) return;
@@ -1360,7 +1365,7 @@
13601365 u16b mask = 0x00;
13611366
13621367 /* Get a "debug command" */
1363- if (!get_com(L"Debug Command Query: ", &cmd))
1368+ if (!get_com(__T("Debug Command Query: "), &cmd))
13641369 return;
13651370
13661371 /* Extract a flag */
@@ -1471,7 +1476,7 @@
14711476 static void do_cmd_wiz_help(void)
14721477 {
14731478 _TCHAR buf[80];
1474- strnfmt(buf, _countof(buf), L"debug.txt");
1479+ strnfmt(buf, _countof(buf), __T("debug.txt"));
14751480 screen_save();
14761481 show_file(buf, NULL, 0, 0);
14771482 screen_load();
@@ -1490,7 +1495,7 @@
14901495 _TCHAR cmd;
14911496
14921497 /* Get a "debug command" */
1493- if (!get_com(L"Debug Command: ", &cmd))
1498+ if (!get_com(__T("Debug Command: "), &cmd))
14941499 return;
14951500
14961501 /* Analyze the command */
--- trunk/JBand/src/z-type.cpp (revision 122)
+++ trunk/JBand/src/z-type.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page (none present).
5+ */
6+/*
37 * File: z-type.cpp
48 * Purpose:
59 *
--- trunk/JBand/src/z-msg.cpp (revision 122)
+++ trunk/JBand/src/z-msg.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page (none present).
5+ */
6+/*
37 * File: z-msg.c
48 * Purpose: Message handling
59 *
--- trunk/JBand/src/z-file.cpp (revision 122)
+++ trunk/JBand/src/z-file.cpp (revision 123)
@@ -1,5 +1,9 @@
11 /* テスト */
22 /*
3+ * Debug Status: Not checked.
4+ * - Fixed __T on this page.
5+ */
6+/*
37 * File: z-file.c
48 * Purpose: Low-level file (and directory) handling
59 *
@@ -71,12 +75,12 @@
7175 # if defined(HAVE_SETRESGID)
7276
7377 if (setresgid(-1, getgid(), -1) != 0)
74- quit(L"setegid(): cannot drop permissions correctly!");
78+ quit(__T("setegid(): cannot drop permissions correctly!"));
7579
7680 # else
7781
7882 if (setegid(getgid()) != 0)
79- quit(L"setegid(): cannot drop permissions correctly!");
83+ quit(__T("setegid(): cannot drop permissions correctly!"));
8084
8185 # endif
8286 #endif /* SET_UID */
@@ -91,12 +95,12 @@
9195 # if defined(HAVE_SETRESGID)
9296
9397 if (setresgid(-1, player_egid, -1) != 0)
94- quit(L"setegid(): cannot grab permissions correctly!");
98+ quit(__T("setegid(): cannot grab permissions correctly!"));
9599
96100 # elif defined(HAVE_SETEGID)
97101
98102 if (setegid(player_egid) != 0)
99- quit(L"setegid(): cannot grab permissions correctly!");
103+ quit(__T("setegid(): cannot grab permissions correctly!"));
100104
101105 # endif
102106 #endif /* SET_UID */
@@ -171,8 +175,8 @@
171175 if (!pw) return;
172176
173177 /* 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);
176180 }
177181 else
178182
@@ -179,7 +183,7 @@
179183 #endif
180184
181185 {
182- strnfcat(buf, len, cur_len, L"%s", path);
186+ strnfcat(buf, len, cur_len, __T("%s"), path);
183187 }
184188 }
185189
@@ -234,8 +238,8 @@
234238 if (!pw) return;
235239
236240 /* 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);
239243 }
240244 else
241245
@@ -242,7 +246,7 @@
242246 #endif
243247
244248 {
245- strnfcat(buf, len, cur_len, L"%s", path);
249+ strnfcat(buf, len, cur_len, __T("%s"), path);
246250 }
247251 }
248252 #endif
@@ -285,7 +289,7 @@
285289 }
286290 /* There is both a relative leafname and a base path from which it is relative */
287291 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);
289293 path_process(buf, len, &cur_len, leaf);
290294
291295 return cur_len;
@@ -323,7 +327,7 @@
323327
324328 /* There is both a relative leafname and a base path from which it is relative */
325329 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);
327331 path_process(buf, len, &cur_len, leaf);
328332
329333 return cur_len;
@@ -510,7 +514,7 @@
510514 modestr = __T("rb");
511515 break;
512516 default:
513- quit(L"Invalid mode value in file_open()!");
517+ quit(__T("Invalid mode value in file_open()!"));
514518 break;
515519 }
516520
@@ -951,8 +955,8 @@
951955
952956 /* Skip directories */
953957 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)
956960 continue;
957961
958962 /* Take this one */
Show on old repository browser