| tFully completed "translated-string" support; %P now supported for prices, too. - vaccinewars - be a doctor and try to vaccinate the world |
| git clone git://src.adamsgaard.dk/vaccinewars |
| Log |
| Files |
| Refs |
| README |
| LICENSE |
| --- |
| commit 4e3602017eea8f0f61368aa22b54d767b22a3f35 |
| parent 1cf917eb25286179db182405ef1ce84a53486e28 |
| Author: Ben Webb |
| Date: Sun, 8 Oct 2000 15:57:50 +0000
Fully completed "translated-string" support; %P now supported for prices, too.
Diffstat:
M ChangeLog | 4 +++-
M po/dopewars.pot | 964 +++++++++++++++----------------
M src/AIPlayer.c | 32 ++++++++++++-------------------
M src/curses_client.c | 47 +++++++++++++------------------
M src/dopewars.c | 9 ++++-----
M src/gtk_client.c | 53 +++++++++++++++----------------
M src/message.c | 12 ++++--------
M src/serverside.c | 34 +++++++++++++------------------
M src/tstring.c | 227 ++++++++++++++++++-------------
M src/tstring.h | 1 +
M src/win32_client.c | 50 ++++++++++---------------------
11 files changed, 706 insertions(+), 727 deletions(-)
--- |
| diff --git a/ChangeLog b/ChangeLog |
| t@@ -1,7 +1,9 @@
1.4.9
- Completely rewritten fighting code
- - Tense and case-sensitive translated strings
- Internationalization (i18n) support
+ - Tense and case-sensitive translated strings handled via. dpg_ analogues
+ to glib's g_ string handling functions %P = price,
+ %Txx or %txx = tense-sensitive string
- Networking revamped - now uses nonblocking sockets to improve server
responsiveness and to remove deadlocks (previously, any client could
halt server by sending an unterminated message); "abilities" added to |
| diff --git a/po/dopewars.pot b/po/dopewars.pot |
| t@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-10-02 22:34+0100\n"
+"POT-Creation-Date: 2000-10-08 16:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
t@@ -14,781 +14,780 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
-#: src/dopewars.c:108
+#: src/dopewars.c:109
msgid "bitch"
msgstr ""
-#: src/dopewars.c:108
+#: src/dopewars.c:109
msgid "bitches"
msgstr ""
-#: src/dopewars.c:108
+#: src/dopewars.c:109
msgid "gun"
msgstr ""
-#: src/dopewars.c:108
+#: src/dopewars.c:109
msgid "guns"
msgstr ""
-#: src/dopewars.c:108
+#: src/dopewars.c:109
msgid "drug"
msgstr ""
-#: src/dopewars.c:108
+#: src/dopewars.c:109
msgid "drugs"
msgstr ""
-#: src/dopewars.c:109
+#: src/dopewars.c:110
msgid "12-"
msgstr ""
-#: src/dopewars.c:109
+#: src/dopewars.c:110
msgid "-1984"
msgstr ""
-#: src/dopewars.c:110
+#: src/dopewars.c:111
msgid "Hardass"
msgstr ""
-#: src/dopewars.c:110
+#: src/dopewars.c:111
msgid "Bob"
msgstr ""
-#: src/dopewars.c:110
+#: src/dopewars.c:111
msgid "the Loan Shark"
msgstr ""
-#: src/dopewars.c:110
+#: src/dopewars.c:111
msgid "the Bank"
msgstr ""
-#: src/dopewars.c:111
+#: src/dopewars.c:112
msgid "Dan's House of Guns"
msgstr ""
-#: src/dopewars.c:111
+#: src/dopewars.c:112
msgid "the pub"
msgstr ""
-#: src/dopewars.c:127
+#: src/dopewars.c:128
msgid "Network port to connect to"
msgstr ""
-#: src/dopewars.c:130
+#: src/dopewars.c:131
msgid "Name of the high score file"
msgstr ""
-#: src/dopewars.c:131
+#: src/dopewars.c:132
msgid "Name of the server to connect to"
msgstr ""
-#: src/dopewars.c:134
+#: src/dopewars.c:135
msgid "Non-zero if server should report to a metaserver"
msgstr ""
-#: src/dopewars.c:137
+#: src/dopewars.c:138
msgid "Port for metaserver communication (client)"
msgstr ""
-#: src/dopewars.c:140
+#: src/dopewars.c:141
msgid "Port for metaserver communication (server)"
msgstr ""
-#: src/dopewars.c:143
+#: src/dopewars.c:144
msgid "Metaserver name to report server details to"
msgstr ""
-#: src/dopewars.c:146
+#: src/dopewars.c:147
msgid "Path of the CGI script on the metaserver (client)"
msgstr ""
-#: src/dopewars.c:149
+#: src/dopewars.c:150
msgid "Preferred hostname of your server machine"
msgstr ""
-#: src/dopewars.c:151
+#: src/dopewars.c:152
msgid "Authentication for LocalName with the metaserver"
msgstr ""
-#: src/dopewars.c:154
+#: src/dopewars.c:155
msgid "Server description, reported to the metaserver"
msgstr ""
-#: src/dopewars.c:157
+#: src/dopewars.c:158
msgid "Program used to display multi-page output"
msgstr ""
-#: src/dopewars.c:159
+#: src/dopewars.c:160
msgid "No. of game turns (if 0, game never ends)"
msgstr ""
-#: src/dopewars.c:161
+#: src/dopewars.c:162
msgid "Random events are sanitized"
msgstr ""
-#: src/dopewars.c:164
+#: src/dopewars.c:165
msgid "Non-zero if the total value of bought drugs should be stored"
msgstr ""
-#: src/dopewars.c:167
+#: src/dopewars.c:168
msgid "Be verbose in processing config file"
msgstr ""
-#: src/dopewars.c:169
+#: src/dopewars.c:170
msgid "Number of locations in the game"
msgstr ""
-#: src/dopewars.c:172
+#: src/dopewars.c:173
msgid "Number of guns in the game"
msgstr ""
-#: src/dopewars.c:174
+#: src/dopewars.c:175
msgid "Number of drugs in the game"
msgstr ""
-#: src/dopewars.c:176
+#: src/dopewars.c:177
msgid "Location of the Loan Shark"
msgstr ""
-#: src/dopewars.c:178
+#: src/dopewars.c:179
msgid "Location of the bank"
msgstr ""
-#: src/dopewars.c:180
+#: src/dopewars.c:181
msgid "Location of the gun shop"
msgstr ""
-#: src/dopewars.c:182
+#: src/dopewars.c:183
msgid "Location of the pub"
msgstr ""
-#: src/dopewars.c:185
+#: src/dopewars.c:186
msgid "Name of the loan shark"
msgstr ""
-#: src/dopewars.c:187
+#: src/dopewars.c:188
msgid "Name of the bank"
msgstr ""
-#: src/dopewars.c:189
+#: src/dopewars.c:190
msgid "Name of the gun shop"
msgstr ""
-#: src/dopewars.c:191
+#: src/dopewars.c:192
msgid "Name of the pub"
msgstr ""
-#: src/dopewars.c:193
+#: src/dopewars.c:194
msgid "Sort key for listing available drugs"
msgstr ""
-#: src/dopewars.c:196
+#: src/dopewars.c:197
msgid "No. of seconds in which to return fire"
msgstr ""
-#: src/dopewars.c:199
+#: src/dopewars.c:200
msgid "Players are disconnected after this many seconds"
msgstr ""
-#: src/dopewars.c:202
+#: src/dopewars.c:203
msgid "Time in seconds for connections to be made or broken"
msgstr ""
-#: src/dopewars.c:205
+#: src/dopewars.c:206
msgid "Maximum number of TCP/IP connections"
msgstr ""
-#: src/dopewars.c:208
+#: src/dopewars.c:209
msgid "Seconds between turns of AI players"
msgstr ""
-#: src/dopewars.c:211
+#: src/dopewars.c:212
msgid "Amount of cash that each player starts with"
msgstr ""
-#: src/dopewars.c:214
+#: src/dopewars.c:215
msgid "Amount of debt that each player starts with"
msgstr ""
-#: src/dopewars.c:216
+#: src/dopewars.c:217
msgid "Name of each location"
msgstr ""
-#: src/dopewars.c:220
+#: src/dopewars.c:221
msgid "Police presence at each location (%)"
msgstr ""
-#: src/dopewars.c:224
+#: src/dopewars.c:225
msgid "Minimum number of drugs at each location"
msgstr ""
-#: src/dopewars.c:228
+#: src/dopewars.c:229
msgid "Maximum number of drugs at each location"
msgstr ""
-#: src/dopewars.c:232
+#: src/dopewars.c:233
msgid "Name of each drug"
msgstr ""
-#: src/dopewars.c:236
+#: src/dopewars.c:237
msgid "Minimum normal price of each drug"
msgstr ""
-#: src/dopewars.c:240
+#: src/dopewars.c:241
msgid "Maximum normal price of each drug"
msgstr ""
-#: src/dopewars.c:244
+#: src/dopewars.c:245
msgid "Non-zero if this drug can be specially cheap"
msgstr ""
-#: src/dopewars.c:248
+#: src/dopewars.c:249
msgid "Non-zero if this drug can be specially expensive"
msgstr ""
-#: src/dopewars.c:252
+#: src/dopewars.c:253
msgid "Message displayed when this drug is specially cheap"
msgstr ""
-#: src/dopewars.c:256 src/dopewars.c:259
+#: src/dopewars.c:257 src/dopewars.c:260
#, c-format
msgid "Format string used for expensive drugs 50% of time"
msgstr ""
-#: src/dopewars.c:262
+#: src/dopewars.c:263
msgid "Divider for drug price when it's specially cheap"
msgstr ""
-#: src/dopewars.c:265
+#: src/dopewars.c:266
msgid "Multiplier for specially expensive drug prices"
msgstr ""
-#: src/dopewars.c:268
+#: src/dopewars.c:269
msgid "Name of each gun"
msgstr ""
-#: src/dopewars.c:272
+#: src/dopewars.c:273
msgid "Price of each gun"
msgstr ""
-#: src/dopewars.c:276
+#: src/dopewars.c:277
msgid "Space taken by each gun"
msgstr ""
-#: src/dopewars.c:280
+#: src/dopewars.c:281
msgid "Damage done by each gun"
msgstr ""
-#: src/dopewars.c:284
+#: src/dopewars.c:285
#, c-format
msgid "% probability of escaping from Officer Hardass"
msgstr ""
-#: src/dopewars.c:287
+#: src/dopewars.c:288
msgid "Modifier to EscapeProb for each extra deputy"
msgstr ""
-#: src/dopewars.c:290
+#: src/dopewars.c:291
#, c-format
msgid "% probability that Officer Hardass hits you"
msgstr ""
-#: src/dopewars.c:293
+#: src/dopewars.c:294
msgid "Modifier to HitProb for each extra deputy"
msgstr ""
-#: src/dopewars.c:296
+#: src/dopewars.c:297
msgid "Maximum damage done to you by each cop"
msgstr ""
-#: src/dopewars.c:299
+#: src/dopewars.c:300
msgid "Toughness of (difficulty of hitting) each cop"
msgstr ""
-#: src/dopewars.c:302
+#: src/dopewars.c:303
#, c-format
msgid "% probability that the cops catch you dropping drugs"
msgstr ""
-#: src/dopewars.c:305
+#: src/dopewars.c:306
msgid "Word used to denote a single \"bitch\""
msgstr ""
-#: src/dopewars.c:307
+#: src/dopewars.c:308
msgid "Word used to denote two or more \"bitches\""
msgstr ""
-#: src/dopewars.c:310
+#: src/dopewars.c:311
msgid "Word used to denote a single gun or equivalent"
msgstr ""
-#: src/dopewars.c:313
+#: src/dopewars.c:314
msgid "Word used to denote two or more guns"
msgstr ""
-#: src/dopewars.c:315
+#: src/dopewars.c:316
msgid "Word used to denote a single drug or equivalent"
msgstr ""
-#: src/dopewars.c:318
+#: src/dopewars.c:319
msgid "Word used to denote two or more drugs"
msgstr ""
-#: src/dopewars.c:320
+#: src/dopewars.c:321
msgid "Text prefixed to the turn number (i.e. the month)"
msgstr ""
-#: src/dopewars.c:323
+#: src/dopewars.c:324
msgid "Text appended to the turn number (i.e. the year)"
msgstr ""
-#: src/dopewars.c:326
+#: src/dopewars.c:327
msgid "Name of the police officer"
msgstr ""
-#: src/dopewars.c:328
+#: src/dopewars.c:329
msgid "Name of the reserve police officer"
msgstr ""
-#: src/dopewars.c:330
+#: src/dopewars.c:331
msgid "Cost for a bitch to spy on the enemy"
msgstr ""
-#: src/dopewars.c:333
+#: src/dopewars.c:334
msgid "Cost for a bitch to tipoff the cops to an enemy"
msgstr ""
-#: src/dopewars.c:336
+#: src/dopewars.c:337
msgid "Minimum price to hire a bitch"
msgstr ""
-#: src/dopewars.c:339
+#: src/dopewars.c:340
msgid "Maximum price to hire a bitch"
msgstr ""
-#: src/dopewars.c:342
+#: src/dopewars.c:343
msgid "List of things which you overhear on the subway"
msgstr ""
-#: src/dopewars.c:345
+#: src/dopewars.c:346
msgid "Number of subway sayings"
msgstr ""
-#: src/dopewars.c:348
+#: src/dopewars.c:349
msgid "List of songs which you can hear playing"
msgstr ""
-#: src/dopewars.c:351
+#: src/dopewars.c:352
msgid "Number of playing songs"
msgstr ""
-#: src/dopewars.c:354
+#: src/dopewars.c:355
msgid "List of things which you can stop to do"
msgstr ""
-#: src/dopewars.c:357
+#: src/dopewars.c:358
msgid "Number of things which you can stop to do"
msgstr ""
-#: src/dopewars.c:362
+#: src/dopewars.c:363
msgid "escaped"
msgstr ""
-#: src/dopewars.c:362
+#: src/dopewars.c:363
msgid "defected"
msgstr ""
-#: src/dopewars.c:362
+#: src/dopewars.c:363
msgid "was shot"
msgstr ""
-#: src/dopewars.c:366
+#: src/dopewars.c:367
msgid "`Are you Experienced` by Jimi Hendrix"
msgstr ""
-#: src/dopewars.c:367
+#: src/dopewars.c:368
msgid "`Cheeba Cheeba` by Tone Loc"
msgstr ""
-#: src/dopewars.c:368
+#: src/dopewars.c:369
msgid "`Comin` in to Los Angeles` by Arlo Guthrie"
msgstr ""
-#: src/dopewars.c:369
+#: src/dopewars.c:370
msgid "`Commercial` by Spanky and Our Gang"
msgstr ""
-#: src/dopewars.c:370
+#: src/dopewars.c:371
msgid "`Late in the Evening` by Paul Simon"
msgstr ""
-#: src/dopewars.c:371
+#: src/dopewars.c:372
msgid "`Light Up` by Styx"
msgstr ""
-#: src/dopewars.c:372
+#: src/dopewars.c:373
msgid "`Mexico` by Jefferson Airplane"
msgstr ""
-#: src/dopewars.c:373
+#: src/dopewars.c:374
msgid "`One toke over the line` by Brewer & Shipley"
msgstr ""
-#: src/dopewars.c:374
+#: src/dopewars.c:375
msgid "`The Smokeout` by Shel Silverstein"
msgstr ""
-#: src/dopewars.c:375
+#: src/dopewars.c:376
msgid "`White Rabbit` by Jefferson Airplane"
msgstr ""
-#: src/dopewars.c:376
+#: src/dopewars.c:377
msgid "`Itchycoo Park` by Small Faces"
msgstr ""
-#: src/dopewars.c:377
+#: src/dopewars.c:378
msgid "`White Punks on Dope` by the Tubes"
msgstr ""
-#: src/dopewars.c:378
+#: src/dopewars.c:379
msgid "`Legend of a Mind` by the Moody Blues"
msgstr ""
-#: src/dopewars.c:379
+#: src/dopewars.c:380
msgid "`Eight Miles High` by the Byrds"
msgstr ""
-#: src/dopewars.c:380
+#: src/dopewars.c:381
msgid "`Acapulco Gold` by Riders of the Purple Sage"
msgstr ""
-#: src/dopewars.c:381
+#: src/dopewars.c:382
msgid "`Kicks` by Paul Revere & the Raiders"
msgstr ""
-#: src/dopewars.c:382
+#: src/dopewars.c:383
msgid "the Nixon tapes"
msgstr ""
-#: src/dopewars.c:383
+#: src/dopewars.c:384
msgid "`Legalize It` by Mojo Nixon & Skid Roper"
msgstr ""
-#: src/dopewars.c:388
+#: src/dopewars.c:389
msgid "have a beer"
msgstr ""
-#: src/dopewars.c:389
+#: src/dopewars.c:390
msgid "smoke a joint"
msgstr ""
-#: src/dopewars.c:390
+#: src/dopewars.c:391
msgid "smoke a cigar"
msgstr ""
-#: src/dopewars.c:391
+#: src/dopewars.c:392
msgid "smoke a Djarum"
msgstr ""
-#: src/dopewars.c:392
+#: src/dopewars.c:393
msgid "smoke a cigarette"
msgstr ""
-#: src/dopewars.c:396
+#: src/dopewars.c:397
msgid "Baretta"
msgstr ""
-#: src/dopewars.c:397
+#: src/dopewars.c:398
msgid ".38 Special"
msgstr ""
-#: src/dopewars.c:398
+#: src/dopewars.c:399
msgid "Ruger"
msgstr ""
-#: src/dopewars.c:399
+#: src/dopewars.c:400
msgid "Saturday Night Special"
msgstr ""
-#: src/dopewars.c:403
+#: src/dopewars.c:404
msgid "Bronx"
msgstr ""
-#: src/dopewars.c:404
+#: src/dopewars.c:405
msgid "Ghetto"
msgstr ""
-#: src/dopewars.c:405
+#: src/dopewars.c:406
msgid "Central Park"
msgstr ""
-#: src/dopewars.c:406
+#: src/dopewars.c:407
msgid "Manhattan"
msgstr ""
-#: src/dopewars.c:407
+#: src/dopewars.c:408
msgid "Coney Island"
msgstr ""
-#: src/dopewars.c:408
+#: src/dopewars.c:409
msgid "Brooklyn"
msgstr ""
-#: src/dopewars.c:409
+#: src/dopewars.c:410
msgid "Queens"
msgstr ""
-#: src/dopewars.c:410
+#: src/dopewars.c:411
msgid "Staten Island"
msgstr ""
-#: src/dopewars.c:414
+#: src/dopewars.c:415
msgid "Acid"
msgstr ""
-#: src/dopewars.c:415
+#: src/dopewars.c:416
msgid "The market is flooded with cheap home-made acid!"
msgstr ""
-#: src/dopewars.c:416
+#: src/dopewars.c:417
msgid "Cocaine"
msgstr ""
-#: src/dopewars.c:417
+#: src/dopewars.c:418
msgid "Hashish"
msgstr ""
-#: src/dopewars.c:417
+#: src/dopewars.c:418
msgid "The Marrakesh Express has arrived!"
msgstr ""
-#: src/dopewars.c:418
+#: src/dopewars.c:419
msgid "Heroin"
msgstr ""
-#: src/dopewars.c:419
+#: src/dopewars.c:420
msgid "Ludes"
msgstr ""
-#: src/dopewars.c:420
+#: src/dopewars.c:421
msgid "Rival drug dealers raided a pharmacy and are selling cheap ludes!"
msgstr ""
-#: src/dopewars.c:421
+#: src/dopewars.c:422
msgid "MDA"
msgstr ""
-#: src/dopewars.c:422
+#: src/dopewars.c:423
msgid "Opium"
msgstr ""
-#: src/dopewars.c:423
+#: src/dopewars.c:424
msgid "PCP"
msgstr ""
-#: src/dopewars.c:424
+#: src/dopewars.c:425
msgid "Peyote"
msgstr ""
-#: src/dopewars.c:425
+#: src/dopewars.c:426
msgid "Shrooms"
msgstr ""
-#: src/dopewars.c:426
+#: src/dopewars.c:427
msgid "Speed"
msgstr ""
-#: src/dopewars.c:427
+#: src/dopewars.c:428
msgid "Weed"
msgstr ""
-#: src/dopewars.c:427
+#: src/dopewars.c:428
msgid ""
"Columbian freighter dusted the Coast Guard! Weed prices have bottomed out!"
msgstr ""
-#: src/dopewars.c:433
+#: src/dopewars.c:434
#, c-format
msgid "Cops made a big %s bust! Prices are outrageous!"
msgstr ""
-#: src/dopewars.c:434
+#: src/dopewars.c:435
#, c-format
msgid "Addicts are buying %s at ridiculous prices!"
msgstr ""
-#: src/dopewars.c:439
+#: src/dopewars.c:440
msgid "Wouldn't it be funny if everyone suddenly quacked at once?"
msgstr ""
-#: src/dopewars.c:440
+#: src/dopewars.c:441
msgid "The Pope was once Jewish, you know"
msgstr ""
-#: src/dopewars.c:441
+#: src/dopewars.c:442
msgid "I'll bet you have some really interesting dreams"
msgstr ""
-#: src/dopewars.c:442
+#: src/dopewars.c:443
msgid "So I think I'm going to Amsterdam this year"
msgstr ""
-#: src/dopewars.c:443
+#: src/dopewars.c:444
msgid "Son, you need a yellow haircut"
msgstr ""
-#: src/dopewars.c:444
+#: src/dopewars.c:445
msgid "I think it's wonderful what they're doing with incense these days"
msgstr ""
-#: src/dopewars.c:445
+#: src/dopewars.c:446
msgid "I wasn't always a woman, you know"
msgstr ""
-#: src/dopewars.c:446
+#: src/dopewars.c:447
msgid "Does your mother know you're a dope dealer?"
msgstr ""
-#: src/dopewars.c:447
+#: src/dopewars.c:448
msgid "Are you high on something?"
msgstr ""
-#: src/dopewars.c:448
+#: src/dopewars.c:449
msgid "Oh, you must be from California"
msgstr ""
-#: src/dopewars.c:449
+#: src/dopewars.c:450
msgid "I used to be a hippie, myself"
msgstr ""
-#: src/dopewars.c:450
+#: src/dopewars.c:451
msgid "There's nothing like having lots of money"
msgstr ""
-#: src/dopewars.c:451
+#: src/dopewars.c:452
msgid "You look like an aardvark!"
msgstr ""
-#: src/dopewars.c:452
+#: src/dopewars.c:453
msgid "I don't believe in Ronald Reagan"
msgstr ""
-#: src/dopewars.c:453
+#: src/dopewars.c:454
msgid "Courage! Bush is a noodle!"
msgstr ""
-#: src/dopewars.c:454
+#: src/dopewars.c:455
msgid "Haven't I seen you on TV?"
msgstr ""
-#: src/dopewars.c:455
+#: src/dopewars.c:456
msgid "I think hemorrhoid commercials are really neat!"
msgstr ""
-#: src/dopewars.c:456
+#: src/dopewars.c:457
msgid "We're winning the war for drugs!"
msgstr ""
-#: src/dopewars.c:457
+#: src/dopewars.c:458
msgid "A day without dope is like night"
msgstr ""
-#: src/dopewars.c:458
+#: src/dopewars.c:459
#, c-format
msgid "We only use 20% of our brains, so why not burn out the other 80%"
msgstr ""
-#: src/dopewars.c:459
+#: src/dopewars.c:460
msgid "I'm soliciting contributions for Zombies for Christ"
msgstr ""
-#: src/dopewars.c:460
+#: src/dopewars.c:461
msgid "I'd like to sell you an edible poodle"
msgstr ""
-#: src/dopewars.c:461
+#: src/dopewars.c:462
msgid "Winners don't do drugs... unless they do"
msgstr ""
-#: src/dopewars.c:462
+#: src/dopewars.c:463
msgid "Kill a cop for Christ!"
msgstr ""
-#: src/dopewars.c:463
+#: src/dopewars.c:464
msgid "I am the walrus!"
msgstr ""
-#: src/dopewars.c:464
+#: src/dopewars.c:465
msgid "Jesus loves you more than you will know"
msgstr ""
-#: src/dopewars.c:465
+#: src/dopewars.c:466
msgid "I feel an unaccountable urge to dye my hair blue"
msgstr ""
-#: src/dopewars.c:466
+#: src/dopewars.c:467
msgid "Wasn't Jane Fonda wonderful in Barbarella"
msgstr ""
-#: src/dopewars.c:467
+#: src/dopewars.c:468
msgid "Just say No... well, maybe... ok, what the hell!"
msgstr ""
-#: src/dopewars.c:468
+#: src/dopewars.c:469
msgid "Would you like a jelly baby?"
msgstr ""
-#: src/dopewars.c:469
+#: src/dopewars.c:470
msgid "Drugs can be your friend!"
msgstr ""
-#: src/dopewars.c:1126
+#: src/dopewars.c:1127
msgid "Unable to process configuration file line"
msgstr ""
-#: src/dopewars.c:1187
+#: src/dopewars.c:1188
msgid ""
"Configuration can only be changed interactively when no\n"
"players are logged on. Wait for all players to log off, or remove\n"
"them with the push or kill commands, and try again."
msgstr ""
-#: src/dopewars.c:1248
+#: src/dopewars.c:1249
#, c-format
msgid "Index into %s array should be between 1 and %d"
msgstr ""
-#: src/dopewars.c:1267
+#: src/dopewars.c:1268
#, c-format
msgid "%s is %d\n"
msgstr ""
-#: src/dopewars.c:1272
-#, c-format
-msgid "%s is %s\n"
+#: src/dopewars.c:1271
+msgid "%s is %P\n"
msgstr ""
-#: src/dopewars.c:1275
+#: src/dopewars.c:1274
#, c-format
msgid "%s is \"%s\"\n"
msgstr ""
-#: src/dopewars.c:1279
+#: src/dopewars.c:1278
#, c-format
msgid "%s[%d] is %s\n"
msgstr ""
-#: src/dopewars.c:1282
+#: src/dopewars.c:1281
#, c-format
msgid "%s is { "
msgstr ""
-#: src/dopewars.c:1313
+#: src/dopewars.c:1312
#, c-format
msgid "Resized structure list to %d elements\n"
msgstr ""
-#: src/dopewars.c:1457
+#: src/dopewars.c:1456
#, c-format
msgid ""
"Usage: dopewars [OPTION]...\n"
t@@ -1002,7 +1001,7 @@ msgstr ""
msgid "CLQP"
msgstr ""
-#: src/curses_client.c:372 src/gtk_client.c:816
+#: src/curses_client.c:372 src/gtk_client.c:813
msgid "Where to, dude ? "
msgstr ""
t@@ -1018,11 +1017,11 @@ msgstr ""
msgid "How many do you drop? "
msgstr ""
-#: src/curses_client.c:456 src/curses_client.c:834
+#: src/curses_client.c:456 src/curses_client.c:832
msgid "What do you wish to buy? "
msgstr ""
-#: src/curses_client.c:458 src/curses_client.c:836
+#: src/curses_client.c:458 src/curses_client.c:834
msgid "What do you wish to sell? "
msgstr ""
t@@ -1044,336 +1043,331 @@ msgstr ""
msgid "How many do you sell? "
msgstr ""
-#: src/curses_client.c:512
+#: src/curses_client.c:511
msgid "Choose an errand to give one of your %tde..."
msgstr ""
-#: src/curses_client.c:518
-#, c-format
-msgid " S>py on another dealer (cost: %s)"
+#: src/curses_client.c:517
+msgid " S>py on another dealer (cost: %P)"
msgstr ""
-#: src/curses_client.c:522
-#, c-format
-msgid " T>ip off the cops to another dealer (cost: %s)"
+#: src/curses_client.c:521
+msgid " T>ip off the cops to another dealer (cost: %P)"
msgstr ""
-#: src/curses_client.c:525
+#: src/curses_client.c:524
msgid " G>et stuffed"
msgstr ""
-#: src/curses_client.c:528
+#: src/curses_client.c:527
msgid "or C>ontact your spies and receive reports"
msgstr ""
-#: src/curses_client.c:530
+#: src/curses_client.c:529
msgid "or N>o errand ? "
msgstr ""
-#: src/curses_client.c:533
+#: src/curses_client.c:532
msgid "STGCN"
msgstr ""
-#: src/curses_client.c:536
+#: src/curses_client.c:535
msgid "Whom do you want to spy on? "
msgstr ""
-#: src/curses_client.c:541
+#: src/curses_client.c:540
msgid "Whom do you want to tip the cops off to? "
msgstr ""
-#: src/curses_client.c:546
+#: src/curses_client.c:545
msgid " Are you sure? "
msgstr ""
-#: src/curses_client.c:547 src/curses_client.c:565 src/curses_client.c:1713
+#: src/curses_client.c:546 src/curses_client.c:564 src/curses_client.c:1704
msgid "YN"
msgstr ""
-#: src/curses_client.c:563
+#: src/curses_client.c:562
msgid "Are you sure you want to quit? "
msgstr ""
-#: src/curses_client.c:571
+#: src/curses_client.c:570
msgid "New name: "
msgstr ""
-#: src/curses_client.c:627
+#: src/curses_client.c:626
msgid "You have been pushed from the server. Reverting to single player mode."
msgstr ""
-#: src/curses_client.c:637
+#: src/curses_client.c:636
msgid "The server has terminated. Reverting to single player mode."
msgstr ""
-#: src/curses_client.c:652 src/gtk_client.c:339 src/serverside.c:259
+#: src/curses_client.c:651 src/gtk_client.c:339 src/serverside.c:259
#, c-format
msgid "%s joins the game!"
msgstr ""
-#: src/curses_client.c:657 src/gtk_client.c:345
+#: src/curses_client.c:656 src/gtk_client.c:345
#, c-format
msgid "%s has left the game."
msgstr ""
-#: src/curses_client.c:662
+#: src/curses_client.c:661
#, c-format
msgid "%s will now be known as %s."
msgstr ""
-#: src/curses_client.c:686
+#: src/curses_client.c:685
msgid "S U B W A Y"
msgstr ""
-#: src/curses_client.c:729
+#: src/curses_client.c:728
msgid ""
"Unfortunately, somebody else is already using \"your\" name. Please change "
"it."
msgstr ""
-#: src/curses_client.c:750
+#: src/curses_client.c:749
msgid "H I G H S C O R E S"
msgstr ""
-#: src/curses_client.c:807
+#: src/curses_client.c:805
msgid "Will you B>uy, S>ell, or L>eave? "
msgstr ""
-#: src/curses_client.c:812
+#: src/curses_client.c:810
msgid "BSL"
msgstr ""
-#: src/curses_client.c:817
+#: src/curses_client.c:815
msgid "You don't have any %tde to sell!"
msgstr ""
-#: src/curses_client.c:825 src/gtk_client.c:1102
+#: src/curses_client.c:823 src/gtk_client.c:1096
msgid "You'll need more %tde to carry any more %tde!"
msgstr ""
-#: src/curses_client.c:847 src/gtk_client.c:1107
+#: src/curses_client.c:845 src/gtk_client.c:1101
msgid "You don't have enough space to carry that %tde!"
msgstr ""
-#: src/curses_client.c:855 src/gtk_client.c:1111
+#: src/curses_client.c:853 src/gtk_client.c:1105
msgid "You don't have enough cash to buy that %tde!"
msgstr ""
-#: src/curses_client.c:868 src/gtk_client.c:1115
+#: src/curses_client.c:866 src/gtk_client.c:1109
msgid "You don't have any to sell!"
msgstr ""
-#: src/curses_client.c:892
+#: src/curses_client.c:890
msgid "How much money do you pay back? "
msgstr ""
-#: src/curses_client.c:898 src/curses_client.c:928 src/gtk_client.c:1943
+#: src/curses_client.c:896 src/curses_client.c:926 src/gtk_client.c:1937
msgid "You don't have that much money!"
msgstr ""
-#: src/curses_client.c:918
+#: src/curses_client.c:916
msgid "Do you want to D>eposit money, W>ithdraw money, or L>eave ? "
msgstr ""
-#: src/curses_client.c:921
+#: src/curses_client.c:919
msgid "DWL"
msgstr ""
-#: src/curses_client.c:923
+#: src/curses_client.c:921
msgid "How much money? "
msgstr ""
-#: src/curses_client.c:931 src/gtk_client.c:1936
+#: src/curses_client.c:929 src/gtk_client.c:1930
msgid "There isn't that much money in the bank..."
msgstr ""
-#: src/curses_client.c:958
+#: src/curses_client.c:956
msgid "Yes"
msgstr ""
-#: src/curses_client.c:958
+#: src/curses_client.c:956
msgid "No"
msgstr ""
-#: src/curses_client.c:958
+#: src/curses_client.c:956
msgid "Run"
msgstr ""
-#: src/curses_client.c:959 src/gtk_client.c:521
+#: src/curses_client.c:957 src/gtk_client.c:519
msgid "Fight"
msgstr ""
-#: src/curses_client.c:959
+#: src/curses_client.c:957
msgid "Attack"
msgstr ""
-#: src/curses_client.c:959
+#: src/curses_client.c:957
msgid "Evade"
msgstr ""
-#: src/curses_client.c:1028
+#: src/curses_client.c:1026
msgid "Press any key..."
msgstr ""
-#: src/curses_client.c:1160
+#: src/curses_client.c:1157
msgid "Messages"
msgstr ""
-#: src/curses_client.c:1167 src/gtk_client.c:1396
+#: src/curses_client.c:1164 src/gtk_client.c:1390
msgid "Stats"
msgstr ""
-#: src/curses_client.c:1170
-#, c-format
-msgid "Cash %17s"
+#: src/curses_client.c:1167
+msgid "Cash %17P"
msgstr ""
-#: src/curses_client.c:1177
+#: src/curses_client.c:1171
#, c-format
msgid "Health %3d"
msgstr ""
-#: src/curses_client.c:1179
-#, c-format
-msgid "Bank %17s"
+#: src/curses_client.c:1173
+msgid "Bank %17P"
msgstr ""
-#: src/curses_client.c:1183
-#, c-format
-msgid "Debt %17s"
+#: src/curses_client.c:1176
+msgid "Debt %17P"
msgstr ""
-#: src/curses_client.c:1187
+#: src/curses_client.c:1179
#, c-format
msgid "Space %6d"
msgstr ""
-#: src/curses_client.c:1189
+#: src/curses_client.c:1181
msgid "%Tde %3d Space %6d"
msgstr ""
-#: src/curses_client.c:1198
+#: src/curses_client.c:1190
msgid "Trenchcoat"
msgstr ""
-#: src/curses_client.c:1200
+#: src/curses_client.c:1192
msgid "**Stats: Drugs** %Tde"
msgstr ""
-#: src/curses_client.c:1213 src/gtk_client.c:638
+#: src/curses_client.c:1205 src/gtk_client.c:636
msgid "**Stats: Guns** %Tde"
msgstr ""
-#: src/curses_client.c:1239
+#: src/curses_client.c:1231
#, c-format
msgid "Spy reports for %s"
msgstr ""
-#: src/curses_client.c:1242 src/curses_client.c:1246
+#: src/curses_client.c:1234 src/curses_client.c:1238
msgid "%Tde..."
msgstr ""
-#: src/curses_client.c:1267
+#: src/curses_client.c:1259
msgid "No other players are currently logged on!"
msgstr ""
-#: src/curses_client.c:1272
+#: src/curses_client.c:1264
msgid "Players currently logged on:-"
msgstr ""
-#: src/curses_client.c:1420
+#: src/curses_client.c:1412
msgid "Hey dude, what's your name? "
msgstr ""
-#: src/curses_client.c:1455
+#: src/curses_client.c:1447
msgid "Hey dude, the prices of %tde here are:"
msgstr ""
-#: src/curses_client.c:1467
+#: src/curses_client.c:1458
msgid "Will you B>uy"
msgstr ""
-#: src/curses_client.c:1468
+#: src/curses_client.c:1459
msgid ", S>ell"
msgstr ""
-#: src/curses_client.c:1469
+#: src/curses_client.c:1460
msgid ", D>rop"
msgstr ""
-#: src/curses_client.c:1470
+#: src/curses_client.c:1461
msgid ", T>alk, P>age, L>ist"
msgstr ""
-#: src/curses_client.c:1473
+#: src/curses_client.c:1464
msgid ", G>ive"
msgstr ""
-#: src/curses_client.c:1476
+#: src/curses_client.c:1467
msgid ", F>ight"
msgstr ""
-#: src/curses_client.c:1480
+#: src/curses_client.c:1471
msgid ", J>et"
msgstr ""
-#: src/curses_client.c:1482 src/curses_client.c:1497
+#: src/curses_client.c:1473 src/curses_client.c:1488
msgid ", or Q>uit? "
msgstr ""
-#: src/curses_client.c:1490
+#: src/curses_client.c:1481
msgid "Do you "
msgstr ""
-#: src/curses_client.c:1492
+#: src/curses_client.c:1483
msgid "F>ight, "
msgstr ""
-#: src/curses_client.c:1493
+#: src/curses_client.c:1484
msgid "S>tand, "
msgstr ""
-#: src/curses_client.c:1495
+#: src/curses_client.c:1486
msgid "R>un, "
msgstr ""
-#: src/curses_client.c:1496
+#: src/curses_client.c:1487
msgid "D>eal "
msgstr ""
-#: src/curses_client.c:1539
+#: src/curses_client.c:1530
msgid "Connection to server lost! Reverting to single player mode"
msgstr ""
-#: src/curses_client.c:1568
+#: src/curses_client.c:1559
msgid "BSDTPLGFJQ"
msgstr ""
-#: src/curses_client.c:1570
+#: src/curses_client.c:1561
msgid "DRFSQ"
msgstr ""
-#: src/curses_client.c:1598
+#: src/curses_client.c:1589
msgid "List what? P>layers or S>cores? "
msgstr ""
-#: src/curses_client.c:1599
+#: src/curses_client.c:1590
msgid "PS"
msgstr ""
-#: src/curses_client.c:1608
+#: src/curses_client.c:1599
msgid "Whom do you want to page (talk privately to) ? "
msgstr ""
-#: src/curses_client.c:1623
+#: src/curses_client.c:1614
msgid "Talk: "
msgstr ""
-#: src/curses_client.c:1712
+#: src/curses_client.c:1703
msgid "Play again? "
msgstr ""
-#: src/curses_client.c:1724
+#: src/curses_client.c:1715
msgid ""
"No curses client available - rebuild the binary passing the\n"
"--enable-curses-client option to configure, or use a windowed\n"
t@@ -1472,7 +1466,7 @@ msgstr ""
msgid "Inventory"
msgstr ""
-#: src/gtk_client.c:238 src/gtk_client.c:2178 src/gtk_client.c:2543
+#: src/gtk_client.c:238 src/gtk_client.c:2177 src/gtk_client.c:2542
msgid "Close"
msgstr ""
t@@ -1492,187 +1486,184 @@ msgstr ""
msgid "Jetting to %tde"
msgstr ""
-#: src/gtk_client.c:367
-#, c-format
-msgid "_Spy\t(%s)"
+#: src/gtk_client.c:366
+msgid "_Spy\t(%P)"
msgstr ""
-#: src/gtk_client.c:371
-#, c-format
-msgid "_Tipoff\t(%s)"
+#: src/gtk_client.c:369
+msgid "_Tipoff\t(%P)"
msgstr ""
-#: src/gtk_client.c:405
+#: src/gtk_client.c:403
msgid "High Scores"
msgstr ""
-#: src/gtk_client.c:439 src/gtk_client.c:1048 src/gtk_client.c:1508
-#: src/gtk_client.c:1853 src/gtk_client.c:2017 src/gtk_client.c:2293
-#: src/gtk_client.c:2449
+#: src/gtk_client.c:437 src/gtk_client.c:1042 src/gtk_client.c:1502
+#: src/gtk_client.c:1847 src/gtk_client.c:2016 src/gtk_client.c:2292
+#: src/gtk_client.c:2448
msgid "OK"
msgstr ""
-#: src/gtk_client.c:548
+#: src/gtk_client.c:546
msgid "_Deal %Tde"
msgstr ""
-#: src/gtk_client.c:552 src/gtk_client.c:1146 src/gtk_client.c:1343
+#: src/gtk_client.c:550 src/gtk_client.c:1140 src/gtk_client.c:1337
msgid "_Fight"
msgstr ""
-#: src/gtk_client.c:555
+#: src/gtk_client.c:553
msgid "_Stand"
msgstr ""
-#: src/gtk_client.c:558 src/gtk_client.c:1145
+#: src/gtk_client.c:556 src/gtk_client.c:1139
msgid "_Run"
msgstr ""
-#: src/gtk_client.c:645
+#: src/gtk_client.c:643
msgid "**Stats: Bitches** %Tde"
msgstr ""
-#: src/gtk_client.c:807
+#: src/gtk_client.c:804
msgid "Jet to location"
msgstr ""
-#: src/gtk_client.c:876
-#, c-format
-msgid "at %s"
+#: src/gtk_client.c:871
+msgid "at %P"
msgstr ""
-#: src/gtk_client.c:881
+#: src/gtk_client.c:875
msgid "You are currently carrying %d %tde"
msgstr ""
-#: src/gtk_client.c:886
+#: src/gtk_client.c:880
#, c-format
msgid "Available space: %d"
msgstr ""
-#: src/gtk_client.c:891
+#: src/gtk_client.c:885
#, c-format
msgid "You can afford %d"
msgstr ""
-#: src/gtk_client.c:940 src/gtk_client.c:1077
+#: src/gtk_client.c:934 src/gtk_client.c:1071
msgid "Buy"
msgstr ""
-#: src/gtk_client.c:941 src/gtk_client.c:1078
+#: src/gtk_client.c:935 src/gtk_client.c:1072
msgid "Sell"
msgstr ""
-#: src/gtk_client.c:942 src/gtk_client.c:1079
+#: src/gtk_client.c:936 src/gtk_client.c:1073
msgid "Drop"
msgstr ""
-#: src/gtk_client.c:1031
+#: src/gtk_client.c:1025
msgid "Buy how many?"
msgstr ""
-#: src/gtk_client.c:1033
+#: src/gtk_client.c:1027
msgid "Sell how many?"
msgstr ""
-#: src/gtk_client.c:1035
+#: src/gtk_client.c:1029
msgid "Drop how many?"
msgstr ""
-#: src/gtk_client.c:1054 src/gtk_client.c:1853 src/gtk_client.c:2028
-#: src/gtk_client.c:2301
+#: src/gtk_client.c:1048 src/gtk_client.c:1847 src/gtk_client.c:2027
+#: src/gtk_client.c:2300
msgid "Cancel"
msgstr ""
-#: src/gtk_client.c:1090
+#: src/gtk_client.c:1084
msgid "Buy %tde"
msgstr ""
-#: src/gtk_client.c:1091
+#: src/gtk_client.c:1085
msgid "Sell %tde"
msgstr ""
-#: src/gtk_client.c:1092
+#: src/gtk_client.c:1086
msgid "Drop %tde"
msgstr ""
-#: src/gtk_client.c:1097
+#: src/gtk_client.c:1091
msgid "You don't have any %tde!"
msgstr ""
-#: src/gtk_client.c:1145 src/gtk_client.c:1854
+#: src/gtk_client.c:1139 src/gtk_client.c:1848
msgid "_Yes"
msgstr ""
-#: src/gtk_client.c:1145 src/gtk_client.c:1854
+#: src/gtk_client.c:1139 src/gtk_client.c:1848
msgid "_No"
msgstr ""
-#: src/gtk_client.c:1146
+#: src/gtk_client.c:1140
msgid "_Attack"
msgstr ""
-#: src/gtk_client.c:1146
+#: src/gtk_client.c:1140
msgid "_Evade"
msgstr ""
-#: src/gtk_client.c:1164
+#: src/gtk_client.c:1158
msgid "Question"
msgstr ""
-#: src/gtk_client.c:1293
+#: src/gtk_client.c:1287
msgid "Space"
msgstr ""
-#: src/gtk_client.c:1298
+#: src/gtk_client.c:1292
msgid "Cash"
msgstr ""
-#: src/gtk_client.c:1303
+#: src/gtk_client.c:1297
msgid "Debt"
msgstr ""
-#: src/gtk_client.c:1308
+#: src/gtk_client.c:1302
msgid "Bank"
msgstr ""
-#: src/gtk_client.c:1323
+#: src/gtk_client.c:1317
msgid "Health"
msgstr ""
-#: src/gtk_client.c:1343
+#: src/gtk_client.c:1337
msgid "_Jet!"
msgstr ""
-#: src/gtk_client.c:1373
+#: src/gtk_client.c:1367
msgid "dopewars"
msgstr ""
-#: src/gtk_client.c:1455
+#: src/gtk_client.c:1449
msgid "Drug Dealing and Research"
msgstr ""
-#: src/gtk_client.c:1456
+#: src/gtk_client.c:1450
msgid "Play Testing"
msgstr ""
-#: src/gtk_client.c:1457
+#: src/gtk_client.c:1451
msgid "Extensive Play Testing"
msgstr ""
-#: src/gtk_client.c:1459
+#: src/gtk_client.c:1453
msgid "Constructive Criticism"
msgstr ""
-#: src/gtk_client.c:1461
+#: src/gtk_client.c:1455
msgid "Unconstructive Criticism"
msgstr ""
-#: src/gtk_client.c:1465
+#: src/gtk_client.c:1459
msgid "About dopewars"
msgstr ""
-#: src/gtk_client.c:1474
+#: src/gtk_client.c:1468
msgid ""
"Based on John E. Dell's old Drug Wars game, dopewars is a simulation of an\n"
"imaginary drug market. dopewars is an All-American game which features\n"
t@@ -1684,151 +1675,156 @@ msgid ""
"have one month of game time to make your fortune.\n"
msgstr ""
-#: src/gtk_client.c:1482
+#: src/gtk_client.c:1476
#, c-format
msgid ""
"Version %s Copyright (C) 1998-2000 Ben Webb ben@bellatrix.pcl.ox.ac.uk\n"
"dopewars is released under the GNU General Public Licence\n"
msgstr ""
-#: src/gtk_client.c:1500
+#: src/gtk_client.c:1494
msgid ""
"\n"
"For information on the command line options, type dopewars -h at your\n"
"Unix prompt. This will display a help screen, listing the available options."
msgstr ""
-#: src/gtk_client.c:1538 src/gtk_client.c:1561
+#: src/gtk_client.c:1532 src/gtk_client.c:1555
#, c-format
msgid "Status: Could not connect (%s)"
msgstr ""
-#: src/gtk_client.c:1549
+#: src/gtk_client.c:1543
#, c-format
msgid "Status: Attempting to contact %s..."
msgstr ""
-#: src/gtk_client.c:1609
+#: src/gtk_client.c:1603
#, c-format
msgid "%d of %d"
msgstr ""
-#: src/gtk_client.c:1673 src/gtk_client.c:1714 src/gtk_client.c:1755
+#: src/gtk_client.c:1667 src/gtk_client.c:1708 src/gtk_client.c:1749
msgid "Server"
msgstr ""
-#: src/gtk_client.c:1674 src/gtk_client.c:1729
+#: src/gtk_client.c:1668 src/gtk_client.c:1723
msgid "Port"
msgstr ""
-#: src/gtk_client.c:1675
+#: src/gtk_client.c:1669
msgid "Version"
msgstr ""
-#: src/gtk_client.c:1676
+#: src/gtk_client.c:1670
msgid "Players"
msgstr ""
-#: src/gtk_client.c:1677
+#: src/gtk_client.c:1671
msgid "Comment"
msgstr ""
-#: src/gtk_client.c:1690
+#: src/gtk_client.c:1684
msgid "New Game"
msgstr ""
-#: src/gtk_client.c:1699
+#: src/gtk_client.c:1693
msgid "Hey dude, what's your _name?"
msgstr ""
-#: src/gtk_client.c:1721
+#: src/gtk_client.c:1715
msgid "Host name"
msgstr ""
-#: src/gtk_client.c:1744 src/gtk_client.c:1807
+#: src/gtk_client.c:1738 src/gtk_client.c:1801
msgid "_Connect"
msgstr ""
-#: src/gtk_client.c:1757 src/gtk_client.c:1778
+#: src/gtk_client.c:1751 src/gtk_client.c:1772
msgid "Single player"
msgstr ""
-#: src/gtk_client.c:1763
+#: src/gtk_client.c:1757
msgid "_Antique mode"
msgstr ""
-#: src/gtk_client.c:1770
+#: src/gtk_client.c:1764
msgid "_Start single-player game"
msgstr ""
-#: src/gtk_client.c:1780 src/gtk_client.c:1818
+#: src/gtk_client.c:1774 src/gtk_client.c:1812
msgid "Metaserver"
msgstr ""
-#: src/gtk_client.c:1797
+#: src/gtk_client.c:1791
msgid "_Update"
msgstr ""
-#: src/gtk_client.c:1822
+#: src/gtk_client.c:1816
msgid "Status: Waiting for user input"
msgstr ""
-#: src/gtk_client.c:1974
-#, c-format
-msgid "Cash: %s"
+#: src/gtk_client.c:1958
+msgid "**LoanShark window title** %Tde"
+msgstr ""
+
+#: src/gtk_client.c:1961
+msgid "**BankName window title** %Tde"
+msgstr ""
+
+#: src/gtk_client.c:1975
+msgid "Cash: %P"
msgstr ""
#: src/gtk_client.c:1981
-#, c-format
-msgid "Debt: %s"
+msgid "Debt: %P"
msgstr ""
-#: src/gtk_client.c:1984
-#, c-format
-msgid "Bank: %s"
+#: src/gtk_client.c:1983
+msgid "Bank: %P"
msgstr ""
-#: src/gtk_client.c:1992
+#: src/gtk_client.c:1991
msgid "Pay back:"
msgstr ""
-#: src/gtk_client.c:1995
+#: src/gtk_client.c:1994
msgid "Deposit"
msgstr ""
-#: src/gtk_client.c:1999
+#: src/gtk_client.c:1998
msgid "Withdraw"
msgstr ""
-#: src/gtk_client.c:2023
+#: src/gtk_client.c:2022
msgid "Pay all"
msgstr ""
-#: src/gtk_client.c:2045
+#: src/gtk_client.c:2044
msgid "Player List"
msgstr ""
-#: src/gtk_client.c:2133
+#: src/gtk_client.c:2132
msgid "Talk to player(s)"
msgstr ""
-#: src/gtk_client.c:2155
+#: src/gtk_client.c:2154
msgid "Talk to all players"
msgstr ""
-#: src/gtk_client.c:2159
+#: src/gtk_client.c:2158
msgid "Message:-"
msgstr ""
-#: src/gtk_client.c:2172
+#: src/gtk_client.c:2171
msgid "Send"
msgstr ""
-#: src/gtk_client.c:2263
+#: src/gtk_client.c:2262
msgid "Spy On Player"
msgstr ""
-#: src/gtk_client.c:2265
+#: src/gtk_client.c:2264
msgid ""
"Please choose the player to spy on. Your %tde will\n"
"then offer his services to the player, and if successful,\n"
t@@ -1837,11 +1833,11 @@ msgid ""
"you, so any %tde or %tde that he's carrying may be lost!"
msgstr ""
-#: src/gtk_client.c:2273
+#: src/gtk_client.c:2272
msgid "Tip Off The Cops"
msgstr ""
-#: src/gtk_client.c:2275
+#: src/gtk_client.c:2274
msgid ""
"Please choose the player to tip off the cops to. Your %tde will\n"
"help the cops to attack that player, and then report back to you\n"
t@@ -1849,71 +1845,71 @@ msgid ""
"so any %tde or %tde that he's carrying may be lost!"
msgstr ""
-#: src/gtk_client.c:2314
+#: src/gtk_client.c:2313
msgid "Sack %Tde"
msgstr ""
-#: src/gtk_client.c:2315
+#: src/gtk_client.c:2314
msgid ""
"Are you sure? (Any %tde or %tde carried\n"
"by this %tde may be lost!)"
msgstr ""
-#: src/gtk_client.c:2335
+#: src/gtk_client.c:2334
msgid "Name"
msgstr ""
-#: src/gtk_client.c:2336
+#: src/gtk_client.c:2335
msgid "Price"
msgstr ""
-#: src/gtk_client.c:2337
+#: src/gtk_client.c:2336
msgid "Number"
msgstr ""
-#: src/gtk_client.c:2339
+#: src/gtk_client.c:2338
msgid "_Buy ->"
msgstr ""
-#: src/gtk_client.c:2340
+#: src/gtk_client.c:2339
msgid "<- _Sell"
msgstr ""
-#: src/gtk_client.c:2341
+#: src/gtk_client.c:2340
msgid "_Drop <-"
msgstr ""
-#: src/gtk_client.c:2346
+#: src/gtk_client.c:2345
msgid "%Tde here"
msgstr ""
-#: src/gtk_client.c:2349
+#: src/gtk_client.c:2348
msgid "%Tde carried"
msgstr ""
-#: src/gtk_client.c:2425
+#: src/gtk_client.c:2424
msgid "Change Name"
msgstr ""
-#: src/gtk_client.c:2435
+#: src/gtk_client.c:2434
msgid ""
"Unfortunately, somebody else is already using \"your\" name. Please change "
"it:-"
msgstr ""
-#: src/gtk_client.c:2472
+#: src/gtk_client.c:2471
msgid "**GunShop window title** %Tde"
msgstr ""
-#: src/gtk_client.c:2496
+#: src/gtk_client.c:2495
msgid "Done"
msgstr ""
-#: src/gtk_client.c:2529
+#: src/gtk_client.c:2528
msgid "Spy reports"
msgstr ""
-#: src/gtk_client.c:2595
+#: src/gtk_client.c:2594
msgid ""
"No GTK+ client available - rebuild the binary passing the\n"
"--enable-gtk-client option to configure, or use the curses\n"
t@@ -2135,148 +2131,145 @@ msgstr ""
msgid "(R.I.P.)"
msgstr ""
-#: src/serverside.c:1031
+#: src/serverside.c:1030
#, c-format
msgid "%s: Tipoff from %s"
msgstr ""
-#: src/serverside.c:1049
+#: src/serverside.c:1048
msgid "One of your %tde was spying for %s.^The spy %s!"
msgstr ""
-#: src/serverside.c:1056
+#: src/serverside.c:1055
#, c-format
msgid "Your spy working with %s has been discovered!^The spy %s!"
msgstr ""
-#: src/serverside.c:1079
+#: src/serverside.c:1078
#, c-format
msgid " The lady next to you on the subway said,^ \"%s\"%s"
msgstr ""
-#: src/serverside.c:1082
+#: src/serverside.c:1081
msgid "^ (at least, you -think- that's what she said)"
msgstr ""
-#: src/serverside.c:1084
+#: src/serverside.c:1083
#, c-format
msgid " You hear someone playing %s"
msgstr ""
-#: src/serverside.c:1093 src/serverside.c:1102 src/serverside.c:1111
-#: src/serverside.c:1120
+#: src/serverside.c:1092 src/serverside.c:1101 src/serverside.c:1110
+#: src/serverside.c:1119
msgid "YN^Would you like to visit %tde?"
msgstr ""
-#: src/serverside.c:1131
-msgid "YN^^Would you like to hire a %tde for %s?"
+#: src/serverside.c:1130
+msgid "YN^^Would you like to hire a %tde for %P?"
msgstr ""
-#: src/serverside.c:1144
+#: src/serverside.c:1142
#, c-format
msgid "AE^%s is already here!^Do you Attack, or Evade?"
msgstr ""
-#: src/serverside.c:1466
+#: src/serverside.c:1464
msgid "You were mugged in the subway!"
msgstr ""
-#: src/serverside.c:1477
+#: src/serverside.c:1475
#, c-format
msgid "You meet a friend! He gives you %d %s."
msgstr ""
-#: src/serverside.c:1482
+#: src/serverside.c:1480
#, c-format
msgid "You meet a friend! You give him %d %s."
msgstr ""
-#: src/serverside.c:1491
+#: src/serverside.c:1489
msgid "Sanitized away a RandomOffer"
msgstr ""
-#: src/serverside.c:1496
+#: src/serverside.c:1494
#, c-format
msgid ""
"Police dogs chase you for %d blocks! You dropped some %s! That's a drag, man!"
msgstr ""
-#: src/serverside.c:1512
+#: src/serverside.c:1510
#, c-format
msgid "You find %d %s on a dead dude in the subway!"
msgstr ""
-#: src/serverside.c:1524
+#: src/serverside.c:1522
#, c-format
msgid "Your mama made brownies with some of your %s! They were great!"
msgstr ""
-#: src/serverside.c:1534
+#: src/serverside.c:1532
msgid ""
"YN^There is some weed that smells like paraquat here!^It looks good! Will "
"you smoke it? "
msgstr ""
-#: src/serverside.c:1541
+#: src/serverside.c:1539
#, c-format
msgid "You stopped to %s."
msgstr ""
-#: src/serverside.c:1562
-#, c-format
-msgid "Would you like to buy a bigger trenchcoat for %s?"
+#: src/serverside.c:1560
+msgid "Would you like to buy a bigger trenchcoat for %P?"
msgstr ""
-#: src/serverside.c:1567
-#, c-format
-msgid "YN^Hey dude! I'll help carry your %s for a mere %s. Yes or no?"
+#: src/serverside.c:1565
+msgid "YN^Hey dude! I'll help carry your %tde for a mere %P. Yes or no?"
msgstr ""
-#: src/serverside.c:1579
-#, c-format
-msgid "YN^Would you like to buy a %s for %s?"
+#: src/serverside.c:1575
+msgid "YN^Would you like to buy a %tde for %P?"
msgstr ""
-#: src/serverside.c:1685 src/serverside.c:1778
+#: src/serverside.c:1679 src/serverside.c:1772
#, c-format
msgid "%s: offer was on behalf of %s"
msgstr ""
-#: src/serverside.c:1688
+#: src/serverside.c:1682
#, c-format
msgid "%s has accepted your %s!^Use the G key to contact your spy."
msgstr ""
-#: src/serverside.c:1734
+#: src/serverside.c:1728
msgid ""
"You hallucinated for three days on the wildest trip you ever imagined!^Then "
"you died because your brain disintegrated!"
msgstr ""
-#: src/serverside.c:1758
+#: src/serverside.c:1752
#, c-format
msgid "Too late - %s has just left!"
msgstr ""
-#: src/serverside.c:1781
+#: src/serverside.c:1775
#, c-format
msgid "%s has rejected your %s!"
msgstr ""
-#: src/serverside.c:1824
+#: src/serverside.c:1818
msgid "YN^Officer %%s spots you dropping %s, and chases you!"
msgstr ""
-#: src/serverside.c:1826
+#: src/serverside.c:1820
msgid ""
"YN^Officer %%s and %%d of his deputies spot you dropping %s, and chase you!"
msgstr ""
-#: src/serverside.c:1985
+#: src/serverside.c:1979
msgid "Player removed due to idle timeout"
msgstr ""
-#: src/serverside.c:1995
+#: src/serverside.c:1989
msgid "Player removed due to connect timeout"
msgstr ""
t@@ -2345,100 +2338,100 @@ msgstr ""
msgid "%s arrives with %d %tde, %s!"
msgstr ""
-#: src/message.c:1063
+#: src/message.c:1062
#, c-format
msgid "%s stands and takes it"
msgstr ""
-#: src/message.c:1065
+#: src/message.c:1064
msgid "You stand there like a dummy."
msgstr ""
-#: src/message.c:1070
+#: src/message.c:1069
#, c-format
msgid "%s has got away!"
msgstr ""
-#: src/message.c:1072
+#: src/message.c:1071
msgid "You got away!"
msgstr ""
-#: src/message.c:1077
+#: src/message.c:1076
msgid "Guns reloaded..."
msgstr ""
-#: src/message.c:1082
+#: src/message.c:1081
#, c-format
msgid "%s shoots at %s... and misses!"
msgstr ""
-#: src/message.c:1085
+#: src/message.c:1084
#, c-format
msgid "%s shoots at you... and misses!"
msgstr ""
-#: src/message.c:1088
+#: src/message.c:1087
#, c-format
msgid "You missed %s!"
msgstr ""
-#: src/message.c:1094
+#: src/message.c:1093
#, c-format
msgid "%s shoots %s dead."
msgstr ""
-#: src/message.c:1097
+#: src/message.c:1096
msgid "%s shoots at %s and kills a %tde!"
msgstr ""
-#: src/message.c:1101
+#: src/message.c:1099
#, c-format
msgid "%s shoots at %s."
msgstr ""
-#: src/message.c:1106
+#: src/message.c:1104
#, c-format
msgid "%s wasted you, man! What a drag!"
msgstr ""
-#: src/message.c:1110
+#: src/message.c:1108
msgid "%s shoots at you... and kills a %tde!"
msgstr ""
-#: src/message.c:1114
+#: src/message.c:1111
#, c-format
msgid "%s hits you, man!"
msgstr ""
-#: src/message.c:1118
+#: src/message.c:1115
#, c-format
msgid "You killed %s!"
msgstr ""
-#: src/message.c:1120
+#: src/message.c:1117
msgid "You hit %s, and killed a %tde!"
msgstr ""
-#: src/message.c:1124
+#: src/message.c:1120
#, c-format
msgid "You hit %s!"
msgstr ""
-#: src/message.c:1127
+#: src/message.c:1123
msgid " You loot the body!"
msgstr ""
-#: src/message.c:1130
+#: src/message.c:1126
#, c-format
msgid " (Health: %d)"
msgstr ""
-#: src/AIPlayer.c:58
+#: src/AIPlayer.c:59
#, c-format
msgid "AI Player started; attempting to contact server at %s:%d..."
msgstr ""
-#: src/AIPlayer.c:61
+#: src/AIPlayer.c:62
#, c-format
msgid ""
"Could not connect to dopewars server\n"
t@@ -2446,19 +2439,19 @@ msgid ""
"AI Player terminating abnormally."
msgstr ""
-#: src/AIPlayer.c:65
+#: src/AIPlayer.c:66
msgid "Connection established\n"
msgstr ""
-#: src/AIPlayer.c:85
+#: src/AIPlayer.c:86
msgid "Connection to server lost!\n"
msgstr ""
-#: src/AIPlayer.c:98
+#: src/AIPlayer.c:99
msgid "AI Player terminated OK.\n"
msgstr ""
-#: src/AIPlayer.c:111
+#: src/AIPlayer.c:112
#, c-format
msgid "Using name %s\n"
msgstr ""
t@@ -2478,87 +2471,82 @@ msgid "%s has left the game.\n"
msgstr ""
#: src/AIPlayer.c:172
-#, c-format
-msgid "Jetting to %s with %s cash and %s debt"
+msgid "Jetting to %tde with %P cash and %P debt"
msgstr ""
-#: src/AIPlayer.c:192
+#: src/AIPlayer.c:189
msgid "AI Player killed. Terminating normally.\n"
msgstr ""
-#: src/AIPlayer.c:212
+#: src/AIPlayer.c:209
msgid "Game time is up. Leaving game.\n"
msgstr ""
-#: src/AIPlayer.c:215
+#: src/AIPlayer.c:212
msgid "AI Player pushed from the server.\n"
msgstr ""
-#: src/AIPlayer.c:218
+#: src/AIPlayer.c:215
msgid "The server has terminated.\n"
msgstr ""
-#: src/AIPlayer.c:272
-#, c-format
-msgid "Selling %d %s at %s\n"
+#: src/AIPlayer.c:269
+msgid "Selling %d %tde at %P\n"
msgstr ""
-#: src/AIPlayer.c:288
-#, c-format
-msgid "Buying %d %s at %s\n"
+#: src/AIPlayer.c:284
+msgid "Buying %d %tde at %P\n"
msgstr ""
-#: src/AIPlayer.c:317
-#, c-format
-msgid "Buying a %s for %s at the gun shop\n"
+#: src/AIPlayer.c:312
+msgid "Buying a %tde for %P at the gun shop\n"
msgstr ""
-#: src/AIPlayer.c:357
-#, c-format
-msgid "Debt of %s paid off to loan shark\n"
+#: src/AIPlayer.c:351
+msgid "Debt of %P paid off to loan shark\n"
msgstr ""
-#: src/AIPlayer.c:382
+#: src/AIPlayer.c:374
#, c-format
msgid "Loan shark located at %s\n"
msgstr ""
-#: src/AIPlayer.c:390
+#: src/AIPlayer.c:382
#, c-format
msgid "Gun shop located at %s\n"
msgstr ""
-#: src/AIPlayer.c:398
+#: src/AIPlayer.c:390
#, c-format
msgid "Pub located at %s\n"
msgstr ""
-#: src/AIPlayer.c:411
+#: src/AIPlayer.c:403
#, c-format
msgid "Bank located at %s\n"
msgstr ""
-#: src/AIPlayer.c:435
+#: src/AIPlayer.c:427
msgid "Call yourselves drug dealers?"
msgstr ""
-#: src/AIPlayer.c:436
+#: src/AIPlayer.c:428
msgid "A trained monkey could do better..."
msgstr ""
-#: src/AIPlayer.c:437
+#: src/AIPlayer.c:429
msgid "Think you're hard enough to deal with the likes of me?"
msgstr ""
-#: src/AIPlayer.c:438
+#: src/AIPlayer.c:430
msgid "Zzzzz... are you dealing in candy or what?"
msgstr ""
-#: src/AIPlayer.c:439
+#: src/AIPlayer.c:431
msgid "Reckon I'll just have to shoot you for your own good."
msgstr ""
-#: src/AIPlayer.c:447
+#: src/AIPlayer.c:439
msgid ""
"This binary has been compiled without networking support, and thus cannot "
"act as an AI player.\n" |
| diff --git a/src/AIPlayer.c b/src/AIPlayer.c |
| t@@ -29,6 +29,7 @@
#include "dopeos.h"
#include "dopewars.h"
#include "message.h"
+#include "tstring.h"
#include "AIPlayer.h"
#if NETWORKING
t@@ -118,7 +119,6 @@ int HandleAIMessage(char *Message,Player *AIPlay) {
char *Data,Code,AICode,WasFighting;
Player *From,*tmp;
GSList *list;
- gchar *prstr,*prstr2;
struct timeval tv;
gboolean Handled;
if (ProcessMessage(Message,AIPlay,&From,&AICode,&Code,
t@@ -169,11 +169,8 @@ int HandleAIMessage(char *Message,Player *AIPlay) {
tv.tv_sec=AITurnPause;
tv.tv_usec=0;
bselect(0,NULL,NULL,NULL,&tv);
- g_print(_("Jetting to %s with %s cash and %s debt"),
- Location[(int)AIPlay->IsAt].Name,
- (prstr=FormatPrice(AIPlay->Cash)),
- (prstr2=FormatPrice(AIPlay->Debt)));
- g_free(prstr); g_free(prstr2);
+ dpg_print(_("Jetting to %tde with %P cash and %P debt"),
+ Location[(int)AIPlay->IsAt].Name,AIPlay->Cash,AIPlay->Debt);
if (brandom(0,100)<10) AISendRandomMessage(AIPlay);
break;
case C_UPDATE:
t@@ -244,7 +241,7 @@ void PrintAIMessage(char *Text) {
void AIDealDrugs(Player *AIPlay) {
/* Buy and sell drugs for AI player "AIPlay" */
price_t *Profit,MaxProfit;
- gchar *prstr,*text;
+ gchar *text;
int i,LastHighest,Highest,Num,MinProfit;
Profit = g_new(price_t,NumDrug);
for (i=0;iDrugs[Highest].Carried;
if (MaxProfit>0 && Num>0) {
- g_print(_("Selling %d %s at %s\n"),Num,Drug[Highest].Name,
- (prstr=FormatPrice(AIPlay->Drugs[Highest].Price)));
- g_free(prstr);
+ dpg_print(_("Selling %d %tde at %P\n"),Num,Drug[Highest].Name,
+ AIPlay->Drugs[Highest].Price);
AIPlay->CoatSize+=Num;
AIPlay->Cash+=Num*AIPlay->Drugs[Highest].Price;
text=g_strdup_printf("drug^%d^%d",Highest,-Num);
t@@ -285,9 +281,8 @@ void AIDealDrugs(Player *AIPlay) {
Num=AIPlay->CoatSize-SPACERESERVE;
}
if (MaxProfit<0 && Num>0) {
- g_print(_("Buying %d %s at %s\n"),Num,Drug[Highest].Name,
- (prstr=FormatPrice(AIPlay->Drugs[Highest].Price)));
- g_free(prstr);
+ dpg_print(_("Buying %d %tde at %P\n"),Num,Drug[Highest].Name,
+ AIPlay->Drugs[Highest].Price);
text=g_strdup_printf("drug^%d^%d",Highest,Num);
AIPlay->CoatSize-=Num;
AIPlay->Cash-=Num*AIPlay->Drugs[Highest].Price;
t@@ -303,7 +298,7 @@ void AIGunShop(Player *AIPlay) {
/* Handles a visit to the gun shop by AI player "AIPlay" */
int i;
int Bought;
- gchar *text,*prstr;
+ gchar *text;
do {
Bought=0;
for (i=0;iCoatSize-=Gun[i].Space;
AIPlay->Guns[i].Carried++;
Bought++;
- g_print(_("Buying a %s for %s at the gun shop\n"),Gun[i].Name,
- (prstr=FormatPrice(Gun[i].Price)));
- g_free(prstr);
+ dpg_print(_("Buying a %tde for %P at the gun shop\n"),
+ Gun[i].Name,Gun[i].Price);
text=g_strdup_printf("gun^%d^1",i);
SendClientMessage(AIPlay,C_NONE,C_BUYOBJECT,NULL,text);
g_free(text);
t@@ -354,9 +348,7 @@ void AIPayLoan(Player *AIPlay) {
prstr=pricetostr(AIPlay->Debt);
SendClientMessage(AIPlay,C_NONE,C_PAYLOAN,NULL,prstr);
g_free(prstr);
- g_print(_("Debt of %s paid off to loan shark\n"),
- (prstr=FormatPrice(AIPlay->Debt)));
- g_free(prstr);
+ dpg_print(_("Debt of %P paid off to loan shark\n"),AIPlay->Debt);
}
SendClientMessage(AIPlay,C_NONE,C_DONE,NULL,NULL);
} |
| diff --git a/src/curses_client.c b/src/curses_client.c |
| t@@ -501,7 +501,6 @@ static void GiveErrand(Player *Play) {
/* Prompts the user (player "Play") to give an errand to one of his/her */
/* bitches. The decision is relayed to the server for implementation. */
int c,y;
- gchar *prstr;
GString *text;
Player *To;
t@@ -514,14 +513,14 @@ static void GiveErrand(Player *Play) {
mvaddstr(y++,1,text->str);
attrset(PromptAttr);
if (Play->Bitches.Carried>0) {
- g_string_sprintf(text,
- _(" S>py on another dealer (cost: %s)"),
- prstr=FormatPrice(Prices.Spy));
- mvaddstr(y++,2,text->str); g_free(prstr);
- g_string_sprintf(text,
- _(" T>ip off the cops to another dealer (cost: %s)"),
- prstr=FormatPrice(Prices.Tipoff));
- mvaddstr(y++,2,text->str); g_free(prstr);
+ dpg_string_sprintf(text,
+ _(" S>py on another dealer (cost: %P)"),
+ Prices.Spy);
+ mvaddstr(y++,2,text->str);
+ dpg_string_sprintf(text,
+ _(" T>ip off the cops to another dealer (cost: %P)"),
+ Prices.Tipoff);
+ mvaddstr(y++,2,text->str);
mvaddstr(y++,2,_(" G>et stuffed"));
}
if (Play->Flags&SPYINGON) {
t@@ -792,16 +791,15 @@ void GunShop(Player *Play) {
/* Allows player "Play" to buy and sell guns interactively. Passes the */
/* decisions on to the server for sanity checking and implementation. */
int i,c,c2;
- gchar *text,*prstr;
+ gchar *text;
print_status(Play,0);
attrset(TextAttr);
clear_bottom();
for (i=0;iuy, S>ell, or L>eave? ");
t@@ -1123,7 +1121,6 @@ void print_status(Player *Play,char DispDrug) {
/* details. If "DispDrugs" is TRUE, displays the carried drugs on the */
/* right hand side of the screen; if FALSE, displays the carried guns. */
int i,c;
- gchar *prstr,*caps;
GString *text;
gchar *tfmt,**tstr;
t@@ -1167,21 +1164,16 @@ void print_status(Player *Play,char DispDrug) {
mvaddstr(1,Width/4-2,_("Stats"));
attrset(StatsAttr);
- g_string_sprintf(text,_("Cash %17s"),prstr=FormatPrice(Play->Cash));
- g_free(prstr);
+ g_string_sprintf(text,_("Cash %17P"),Play->Cash);
mvaddstr(3,9,text->str);
- g_string_sprintf(text,"%-19s%3d",caps=InitialCaps(Names.Guns),
- TotalGunsCarried(Play));
- g_free(caps);
+ dpg_string_sprintf(text,"%-19Tde%3d",Names.Guns,TotalGunsCarried(Play));
mvaddstr(Network ? 4 : 5,9,text->str);
g_string_sprintf(text,_("Health %3d"),Play->Health);
mvaddstr(Network ? 5 : 7,9,text->str);
- g_string_sprintf(text,_("Bank %17s"),prstr=FormatPrice(Play->Bank));
- g_free(prstr);
+ dpg_string_sprintf(text,_("Bank %17P"),Play->Bank);
mvaddstr(Network ? 6 : 9,9,text->str);
if (Play->Debt>0) attrset(DebtAttr);
- g_string_sprintf(text,_("Debt %17s"),prstr=FormatPrice(Play->Debt));
- g_free(prstr);
+ dpg_string_sprintf(text,_("Debt %17P"),Play->Debt);
mvaddstr(Network ? 7 : 11,9,text->str);
attrset(TitleAttr);
if (WantAntique) g_string_sprintf(text,_("Space %6d"),Play->CoatSize);
t@@ -1383,7 +1375,7 @@ static void Curses_DoGame(Player *Play) {
/* dopewars is essentially server-driven, so this loop simply has to */
/* make the screen look pretty, respond to user keypresses, and react */
/* to messages from the server. */
- gchar *buf,*OldName,*TalkMsg,*pt,*prstr;
+ gchar *buf,*OldName,*TalkMsg,*pt;
GString *text;
int i,c;
char IsCarrying;
t@@ -1458,9 +1450,8 @@ static void Curses_DoGame(Player *Play) {
i=-1;
for (c=0;cDrugs[i].Price));
- g_free(prstr);
+ dpg_string_sprintf(text,"%c. %-10tde %8P",'A'+c,Drug[i].Name,
+ Play->Drugs[i].Price);
mvaddstr(17+c/3,(c%3)*25+4,text->str);
}
attrset(PromptAttr); |
| diff --git a/src/dopewars.c b/src/dopewars.c |
| t@@ -40,6 +40,7 @@
#include "dopeos.h"
#include "message.h"
#include "serverside.h"
+#include "tstring.h"
#include "AIPlayer.h"
int ClientSock,ListenSock;
t@@ -1256,7 +1257,7 @@ gboolean CheckMaxIndex(GScanner *scanner,int GlobalIndex,int StructIndex,
void PrintConfigValue(int GlobalIndex,int StructIndex,gboolean IndexGiven,
GScanner *scanner) {
- gchar *prstr,*GlobalName;
+ gchar *GlobalName;
int i;
if (!CheckMaxIndex(scanner,GlobalIndex,StructIndex,IndexGiven)) return;
if (Globals[GlobalIndex].NameStruct[0]) {
t@@ -1267,10 +1268,8 @@ void PrintConfigValue(int GlobalIndex,int StructIndex,gboolean IndexGiven,
g_print(_("%s is %d\n"),GlobalName,
*((int *)GetGlobalPointer(GlobalIndex,StructIndex)));
} else if (Globals[GlobalIndex].PriceVal) {
- prstr=FormatPrice(*((price_t *)GetGlobalPointer(GlobalIndex,
- StructIndex)));
- g_print(_("%s is %s\n"),GlobalName,prstr);
- g_free(prstr);
+ dpg_print(_("%s is %P\n"),GlobalName,
+ *((price_t *)GetGlobalPointer(GlobalIndex,StructIndex)));
} else if (Globals[GlobalIndex].StringVal) {
g_print(_("%s is \"%s\"\n"),GlobalName,
*((gchar **)GetGlobalPointer(GlobalIndex,StructIndex))); |
| diff --git a/src/gtk_client.c b/src/gtk_client.c |
| t@@ -284,7 +284,7 @@ void SetSocketWriteTest(Player *Play,gboolean WriteTest) {
void HandleClientMessage(char *pt,Player *Play) {
char *Data,Code,AICode,DisplayMode;
Player *From,*tmp;
- gchar *text,*prstr;
+ gchar *text;
gboolean Handled;
GtkWidget *MenuItem;
GSList *list;
t@@ -363,16 +363,14 @@ void HandleClientMessage(char *pt,Player *Play) {
case C_ENDLIST:
MenuItem=gtk_item_factory_get_widget(ClientData.Menu,
"/Errands/Spy");
- prstr=FormatPrice(Prices.Spy);
- text=g_strdup_printf(_("_Spy\t(%s)"),prstr);
+ text=dpg_strdup_printf(_("_Spy\t(%P)"),Prices.Spy);
gtk_label_parse_uline(GTK_LABEL(GTK_BIN(MenuItem)->child),text);
- g_free(text); g_free(prstr);
- prstr=FormatPrice(Prices.Tipoff);
- text=g_strdup_printf(_("_Tipoff\t(%s)"),prstr);
+ g_free(text);
+ text=dpg_strdup_printf(_("_Tipoff\t(%P)"),Prices.Tipoff);
MenuItem=gtk_item_factory_get_widget(ClientData.Menu,
"/Errands/Tipoff");
gtk_label_parse_uline(GTK_LABEL(GTK_BIN(MenuItem)->child),text);
- g_free(text); g_free(prstr);
+ g_free(text);
break;
case C_UPDATE:
if (From==&Noone) {
t@@ -684,7 +682,7 @@ void UpdateInventory(struct InventoryWidgets *Inven,
gint i,row,selectrow[2];
gpointer rowdata;
price_t price;
- gchar *titles[2],*prstr;
+ gchar *titles[2];
gboolean CanBuy=FALSE,CanSell=FALSE,CanDrop=FALSE;
GList *glist[2],*selection;
GtkCList *clist[2];
t@@ -740,9 +738,8 @@ void UpdateInventory(struct InventoryWidgets *Inven,
if (Objects[i].Carried > 0) {
if (price>0) CanSell=TRUE; else CanDrop=TRUE;
if (HaveAbility(ClientData.Play,A_DRUGVALUE)) {
- prstr=FormatPrice(Objects[i].TotalValue/Objects[i].Carried);
- titles[1] = g_strdup_printf("%d @ %s",Objects[i].Carried,prstr);
- g_free(prstr);
+ titles[1] = dpg_strdup_printf("%d @ %P",Objects[i].Carried,
+ Objects[i].TotalValue/Objects[i].Carried);
} else {
titles[1] = g_strdup_printf("%d",Objects[i].Carried);
}
t@@ -863,7 +860,6 @@ static struct DealDiaStruct DealDialog;
static void UpdateDealDialog() {
GString *text;
- gchar *prstr;
GtkAdjustment *spin_adj;
gint DrugInd,CanDrop,CanCarry,CanAfford,MaxDrug;
Player *Play;
t@@ -872,14 +868,12 @@ static void UpdateDealDialog() {
DrugInd=DealDialog.DrugInd;
Play=ClientData.Play;
- prstr=FormatPrice(Play->Drugs[DrugInd].Price);
- g_string_sprintf(text,_("at %s"),prstr);
- g_free(prstr);
+ dpg_string_sprintf(text,_("at %P"),Play->Drugs[DrugInd].Price);
gtk_label_set_text(GTK_LABEL(DealDialog.cost),text->str);
CanDrop=Play->Drugs[DrugInd].Carried;
dpg_string_sprintf(text,_("You are currently carrying %d %tde"),
- Drug[DrugInd].Name,CanDrop);
+ CanDrop,Drug[DrugInd].Name);
gtk_label_set_text(GTK_LABEL(DealDialog.carrying),text->str);
CanCarry=Play->CoatSize;
t@@ -1952,14 +1946,22 @@ static void TransferOK(GtkWidget *widget,GtkWidget *dialog) {
void TransferDialog(gboolean Debt) {
GtkWidget *dialog,*button,*label,*radio,*table,*vbox,*hbbox,*hsep,*entry;
- gchar *text,*prstr;
+ gchar *text;
GSList *group;
+ gchar *tfmt,**tstr;
dialog=gtk_window_new(GTK_WINDOW_DIALOG);
gtk_signal_connect(GTK_OBJECT(dialog),"destroy",
GTK_SIGNAL_FUNC(SendDoneMessage),NULL);
- gtk_window_set_title(GTK_WINDOW(dialog),Debt ? Names.LoanSharkName :
- Names.BankName);
+ if (Debt) {
+ tstring_fmt(&tfmt,&tstr,
+ _("**LoanShark window title** %Tde"),Names.LoanSharkName);
+ } else {
+ tstring_fmt(&tfmt,&tstr,
+ _("**BankName window title** %Tde"),Names.BankName);
+ }
+ gtk_window_set_title(GTK_WINDOW(dialog),tstr[0]);
+ tstring_free(tfmt,tstr);
gtk_container_set_border_width(GTK_CONTAINER(dialog),7);
gtk_window_set_modal(GTK_WINDOW(dialog),TRUE);
gtk_window_set_transient_for(GTK_WINDOW(dialog),
t@@ -1970,21 +1972,18 @@ void TransferDialog(gboolean Debt) {
gtk_table_set_row_spacings(GTK_TABLE(table),4);
gtk_table_set_col_spacings(GTK_TABLE(table),4);
- prstr=FormatPrice(ClientData.Play->Cash);
- text=g_strdup_printf(_("Cash: %s"),prstr);
+ text=dpg_strdup_printf(_("Cash: %P"),ClientData.Play->Cash);
label=gtk_label_new(text);
- g_free(text); g_free(prstr);
+ g_free(text);
gtk_table_attach_defaults(GTK_TABLE(table),label,0,3,0,1);
if (Debt) {
- prstr=FormatPrice(ClientData.Play->Debt);
- text=g_strdup_printf(_("Debt: %s"),prstr);
+ text=dpg_strdup_printf(_("Debt: %P"),ClientData.Play->Debt);
} else {
- prstr=FormatPrice(ClientData.Play->Bank);
- text=g_strdup_printf(_("Bank: %s"),prstr);
+ text=dpg_strdup_printf(_("Bank: %P"),ClientData.Play->Bank);
}
label=gtk_label_new(text);
- g_free(text); g_free(prstr);
+ g_free(text);
gtk_table_attach_defaults(GTK_TABLE(table),label,0,3,1,2);
gtk_object_set_data(GTK_OBJECT(dialog),"debt",GINT_TO_POINTER(Debt)); |
| diff --git a/src/message.c b/src/message.c |
| t@@ -1054,8 +1054,7 @@ void FormatFightMessage(Player *To,GString *text,
_("armed to the teeth");
if (DefendName[0]) {
dpg_string_sprintfa(text,_("%s arrives with %d %tde, %s!"),
- Names.Bitches,
- DefendName,Bitches,Armament);
+ DefendName,Bitches,Names.Bitches,Armament);
}
break;
case F_STAND:
t@@ -1095,8 +1094,7 @@ void FormatFightMessage(Player *To,GString *text,
AttackName,DefendName);
} else if (BitchesKilled) {
dpg_string_sprintfa(text,_("%s shoots at %s and kills a %tde!"),
- Names.Bitch,
- AttackName,DefendName);
+ AttackName,DefendName,Names.Bitch);
} else {
g_string_sprintfa(text,_("%s shoots at %s."),
AttackName,DefendName);
t@@ -1108,8 +1106,7 @@ void FormatFightMessage(Player *To,GString *text,
} else if (BitchesKilled) {
dpg_string_sprintfa(text,
_("%s shoots at you... and kills a %tde!"),
- Names.Bitch,
- AttackName);
+ AttackName,Names.Bitch);
} else {
g_string_sprintfa(text,_("%s hits you, man!"),AttackName);
}
t@@ -1118,8 +1115,7 @@ void FormatFightMessage(Player *To,GString *text,
g_string_sprintfa(text,_("You killed %s!"),DefendName);
} else if (BitchesKilled) {
dpg_string_sprintfa(text,_("You hit %s, and killed a %tde!"),
- Names.Bitch,
- DefendName);
+ DefendName,Names.Bitch);
} else {
g_string_sprintfa(text,_("You hit %s!"),DefendName);
} |
| diff --git a/src/serverside.c b/src/serverside.c |
| t@@ -1012,7 +1012,6 @@ void SendEvent(Player *To) {
gchar *text;
Player *Play;
GSList *list;
- gchar *prstr;
if (!To) return;
if (To->EventNum==E_MAX) To->EventNum=E_NONE;
t@@ -1047,8 +1046,8 @@ void SendEvent(Player *To) {
else j=brandom(0,NUMDISCOVER-1);
text=dpg_strdup_printf(
_("One of your %tde was spying for %s.^The spy %s!"),
- Names.Bitches,
- GetPlayerName(To->SpyList.Data[i].Play),_(Discover[j]));
+ Names.Bitches,GetPlayerName(To->SpyList.Data[i].Play),
+ _(Discover[j]));
if (j!=DEFECT) LoseBitch(To,NULL,NULL);
SendPlayerData(To);
SendPrintMessage(NULL,C_NONE,To,text);
t@@ -1127,12 +1126,11 @@ void SendEvent(Player *To) {
case E_HIREBITCH:
if (To->IsAt+1==RoughPubLoc && !WantAntique) {
To->Bitches.Price=brandom(Bitch.MinPrice,Bitch.MaxPrice);
- text=g_strdup_printf(
- _("YN^^Would you like to hire a %tde for %s?"),
- Names.Bitch,
- prstr=FormatPrice(To->Bitches.Price));
+ text=dpg_strdup_printf(
+ _("YN^^Would you like to hire a %tde for %P?"),
+ Names.Bitch,To->Bitches.Price);
SendQuestion(NULL,C_ASKBITCH,To,text);
- g_free(text); g_free(prstr);
+ g_free(text);
return;
}
break;
t@@ -1554,20 +1552,18 @@ int OfferObject(Player *To,char ForceBitch) {
/* TRUE, then a bitch is definitely offered. Returns 0 if the client */
/* can advance immediately to the next state, 1 otherwise. */
int ObjNum;
- gchar *prstr,*text=NULL;
+ gchar *text=NULL;
if (brandom(0,100)<50 || ForceBitch) {
if (WantAntique) {
To->Bitches.Price=brandom(MINTRENCHPRICE,MAXTRENCHPRICE);
- text=g_strdup_printf(_("Would you like to buy a bigger trenchcoat "
- "for %s?"),prstr=FormatPrice(To->Bitches.Price));
- g_free(prstr);
+ text=dpg_strdup_printf(_("Would you like to buy a bigger trenchcoat "
+ "for %P?"),To->Bitches.Price);
} else {
To->Bitches.Price=brandom(Bitch.MinPrice,Bitch.MaxPrice)/10l;
- text=g_strdup_printf(_("YN^Hey dude! I'll help carry your %s for a "
- "mere %s. Yes or no?"),Names.Drugs,
- prstr=FormatPrice(To->Bitches.Price));
- g_free(prstr);
+ text=dpg_strdup_printf(
+ _("YN^Hey dude! I'll help carry your %tde for a "
+ "mere %P. Yes or no?"),Names.Drugs,To->Bitches.Price);
}
SendQuestion(NULL,C_ASKBITCH,To,text);
g_free(text);
t@@ -1576,10 +1572,8 @@ int OfferObject(Player *To,char ForceBitch) {
ObjNum=brandom(0,NumGun);
To->Guns[ObjNum].Price=Gun[ObjNum].Price/10;
if (Gun[ObjNum].Space>To->CoatSize) return 0;
- text=g_strdup_printf(_("YN^Would you like to buy a %s for %s?"),
- Gun[ObjNum].Name,
- prstr=FormatPrice(To->Guns[ObjNum].Price));
- g_free(prstr);
+ text=dpg_strdup_printf(_("YN^Would you like to buy a %tde for %P?"),
+ Gun[ObjNum].Name,To->Guns[ObjNum].Price);
SendQuestion(NULL,C_ASKGUN,To,text);
g_free(text);
return 1; |
| diff --git a/src/tstring.c b/src/tstring.c |
| t@@ -20,6 +20,7 @@
#include
+#include
#include
#ifdef HAVE_CONFIG_H
t@@ -31,6 +32,16 @@
#include "message.h"
#include "tstring.h"
+typedef struct _FmtData {
+ union {
+ int IntVal;
+ price_t PriceVal;
+ char CharVal;
+ char *StrVal;
+ } data;
+ char Type;
+} FmtData;
+
gchar *GetTranslatedString(gchar *str,gchar *code,gboolean Caps) {
gchar *dstr,*pt,*tstr,*Default,*tcode;
t@@ -109,137 +120,161 @@ void tstring_free(gchar *tformat,gchar **tstrings) {
g_free(tstrings);
}
-void GetNextFormat(int Index,gchar *str,int *StartPos,
- int *EndPos,int *ArgNum,char *Code,gboolean *Caps) {
- int anum;
- *StartPos=*EndPos=*ArgNum=0;
+void GetNextFormat(int *Index,gchar *str,int *StartPos,
+ int *EndPos,int *FmtPos,gchar *Type,int *ArgNum,int *Wid,
+ int *Prec,char *Code) {
+ int anum,wid,prec,i;
+ gchar type;
+ *StartPos=-1;
+ *EndPos=*FmtPos=*ArgNum=*Wid=*Prec=0;
+ *Type=0;
Code[0]=0;
- anum=0;
- while (str[Index]) {
- if (str[Index]=='%') {
- *StartPos=*EndPos=Index++;
- while (str[Index]>='0' && str[Index]<='9') {
- anum=anum*10+str[Index]-'0';
- Index++;
- }
- if (str[Index]=='$') {
- *EndPos=Index++; *ArgNum=anum;
- }
- if ((str[Index]=='T' || str[Index]=='t') && Index+2='0' && str[i]<='9') wid=wid*10+str[i++]-'0';
+ if (str[i]=='$') {
+ *EndPos=i;
+ i++; anum=wid; wid=0;
+ while (strchr("#0- +'",str[i])) i++; /* Skip flag characters */
+ while (str[i]>='0' && str[i]<='9') wid=wid*10+str[i++]-'0';
+ }
+ if (str[i]=='.') {
+ i++;
+ while (str[i]>='0' && str[i]<='9') prec=prec*10+str[i++]-'0';
+ }
+ *FmtPos=i;
+ type=str[i];
+ if ((type=='T' || type=='t') && i+2str,0,Code,&Caps,NumArg,&StartPos,&EndPos);
- if (EndPos!=0 && *NumArg>=1 && *NumArg<=strs->len) {
- str=(gchar *)g_ptr_array_index(strs,*NumArg-1);
- tstr=GetTranslatedString(str,Code,Caps);
- g_string_erase(string,StartPos,EndPos-StartPos);
- g_string_insert(string,StartPos,tstr);
- g_free(tstr);
- }
-}
+ string=g_string_new("");
+ tmpfmt=g_string_new("");
-gchar *HandleTFmt(gchar *format, va_list args) {
- GString *string;
- gchar *retstr;
- GPtrArray *tstrs;
- int i,numtstr,NumArg;
-
- string=g_string_new(format);
- tstrs=g_ptr_array_new();
- i=numtstr=0;
- while (1) {
- i=SkipNextTString(string->str,i);
- if (i!=0) numtstr++; else break;
+ arr=g_array_new(FALSE,TRUE,sizeof(FmtData));
+ i=DefaultArgNum=0;
+ while (iarr->len) {
+ g_array_set_size(arr,ArgNum);
+ }
+ g_array_index(arr,FmtData,ArgNum-1).Type=Type;
}
- for (i=0;ilen;i++) {
+ fdat=&g_array_index(arr,FmtData,i);
+ switch(fdat->Type) {
+ case '\0':
+ g_error("Incomplete format string!"); break;
+ case 'd':
+ fdat->data.IntVal=va_arg(va,int); break;
+ case 'P':
+ fdat->data.PriceVal=va_arg(va,price_t); break;
+ case 'c':
+ fdat->data.CharVal=(char)va_arg(va,int); break;
+ case 's': case 't': case 'T':
+ fdat->data.StrVal=va_arg(va,char *); break;
+ default:
+ g_error("Unknown format type %c!",fdat->Type);
+ }
}
- NumArg=0;
- for (i=0;iType) g_error("Unmatched types!");
+ switch(Type) {
+ case 'd':
+ g_string_sprintfa(string,tmpfmt->str,fdat->data.IntVal); break;
+ case 'c':
+ g_string_sprintfa(string,tmpfmt->str,fdat->data.CharVal); break;
+ case 'P':
+ fstr=FormatPrice(fdat->data.PriceVal);
+ g_string_sprintfa(string,tmpfmt->str,fstr); g_free(fstr); break;
+ case 't': case 'T':
+ fstr=GetTranslatedString(fdat->data.StrVal,Code,Type=='T');
+ g_string_sprintfa(string,tmpfmt->str,fstr); g_free(fstr); break;
+ case 's':
+ g_string_sprintfa(string,tmpfmt->str,fdat->data.StrVal); break;
+ }
}
retstr=string->str;
- g_ptr_array_free(tstrs,FALSE);
+ g_array_free(arr,TRUE);
g_string_free(string,FALSE);
+ g_string_free(tmpfmt,TRUE);
return retstr;
}
+void dpg_print(gchar *format, ...) {
+ va_list ap;
+ gchar *retstr;
+ va_start(ap,format);
+ retstr=HandleTFmt(format,ap);
+ va_end(ap);
+ g_print(retstr);
+ g_free(retstr);
+}
+
gchar *dpg_strdup_printf(gchar *format, ...) {
va_list ap;
- gchar *newfmt,*retstr;
+ gchar *retstr;
va_start(ap,format);
- newfmt=HandleTFmt(format,ap);
- retstr=g_strdup_vprintf(newfmt,ap);
- g_free(newfmt);
+ retstr=HandleTFmt(format,ap);
va_end(ap);
return retstr;
}
void dpg_string_sprintf(GString *string, gchar *format, ...) {
va_list ap;
- gchar *newfmt,*retstr;
+ gchar *newstr;
va_start(ap,format);
- newfmt=HandleTFmt(format,ap);
- retstr=g_strdup_vprintf(newfmt,ap);
- g_string_assign(string,retstr);
- g_free(newfmt); g_free(retstr);
+ newstr=HandleTFmt(format,ap);
+ g_string_assign(string,newstr);
+ g_free(newstr);
va_end(ap);
}
void dpg_string_sprintfa(GString *string, gchar *format, ...) {
va_list ap;
- gchar *newfmt,*retstr;
+ gchar *newstr;
va_start(ap,format);
- newfmt=HandleTFmt(format,ap);
- retstr=g_strdup_vprintf(newfmt,ap);
- g_string_append(string,retstr);
- g_free(newfmt); g_free(retstr);
+ newstr=HandleTFmt(format,ap);
+ g_string_append(string,newstr);
+ g_free(newstr);
va_end(ap);
} |
| diff --git a/src/tstring.h b/src/tstring.h |
| t@@ -30,6 +30,7 @@
void tstring_fmt(gchar **tformat,gchar ***tstrings,char *OrigFormat, ...);
void tstring_free(gchar *tformat,gchar **tstrings);
+void dpg_print(gchar *format, ...);
gchar *dpg_strdup_printf(gchar *format, ...);
void dpg_string_sprintf(GString *string, gchar *format, ...);
void dpg_string_sprintfa(GString *string, gchar *format, ...); |
| diff --git a/src/win32_client.c b/src/win32_client.c |
| t@@ -116,31 +116,21 @@ static void DisplayStats(Player *Play,struct STATS *Stats) {
g_string_sprintf(text,"Space available: %d",Play->CoatSize);
SetWindowText(Stats->Space,text->str);
- prstr=FormatPrice(Play->Cash);
- g_string_sprintf(text,"Cash: %s",prstr);
+ dpg_string_sprintf(text,"Cash: %P",Play->Cash);
SetWindowText(Stats->Cash,text->str);
- g_free(prstr);
- prstr=FormatPrice(Play->Debt);
- g_string_sprintf(text,"Debt: %s",prstr);
+ dpg_string_sprintf(text,"Debt: %P",Play->Debt);
SetWindowText(Stats->Debt,text->str);
- g_free(prstr);
- prstr=FormatPrice(Play->Bank);
- g_string_sprintf(text,"Bank: %s",prstr);
+ dpg_string_sprintf(text,"Bank: %P",Play->Bank);
SetWindowText(Stats->Bank,text->str);
- g_free(prstr);
- caps=InitialCaps(Names.Guns);
- g_string_sprintf(text,"%s: %d",caps,TotalGunsCarried(Play));
+ dpg_string_sprintf(text,"%Tde: %d",Names.Guns,TotalGunsCarried(Play));
SetWindowText(Stats->Guns,text->str);
- g_free(caps);
if (!WantAntique) {
- caps=InitialCaps(Names.Bitches);
- g_string_sprintf(text,"%s: %d",caps,Play->Bitches.Carried);
+ dpg_string_sprintf(text,"%Tde: %d",Names.Bitches,Play->Bitches.Carried);
SetWindowText(Stats->Bitches,text->str);
- g_free(caps);
} else SetWindowText(Stats->Bitches,"");
g_string_sprintf(text,"Health: %d",Play->Health);
t@@ -192,13 +182,12 @@ void UpdateInventory(HWND HereList,HWND CarriedList,
}
if (HereList && price>0) {
CanBuy=TRUE;
- prstr=FormatPrice(price);
- text=g_strdup_printf("%s\t%s",name,prstr);
+ text=dpg_strdup_printf("%s\t%P",name,price);
addresult=SendMessage(HereList,LB_ADDSTRING,0,(LPARAM)text);
if (addresult>=0 && addresult0) {
if (price>0) CanSell=TRUE; else CanDrop=TRUE;
t@@ -221,15 +210,13 @@ static void SetErrandMenus(HWND hwnd) {
menu=GetMenu(hwnd);
if (!menu) return;
- prstr=FormatPrice(Prices.Spy);
- text=g_strdup_printf("&Spy\t(%s)",prstr);
+ text=dpg_strdup_printf("&Spy\t(%P)",Prices.Spy);
ModifyMenu(menu,ID_SPY,MF_BYCOMMAND | MF_STRING,ID_SPY,text);
- g_free(text); g_free(prstr);
+ g_free(text);
- prstr=FormatPrice(Prices.Tipoff);
- text=g_strdup_printf("&Tipoff\t(%s)",prstr);
+ text=dpg_strdup_printf("&Tipoff\t(%P)",Prices.Tipoff);
ModifyMenu(menu,ID_TIPOFF,MF_BYCOMMAND | MF_STRING,ID_TIPOFF,text);
- g_free(text); g_free(prstr);
+ g_free(text);
DrawMenuBar(hwnd);
}
t@@ -447,9 +434,7 @@ static void UpdateDealDialog(HWND hwnd,LONG DealType,int DrugInd) {
CanDrop=Play->Drugs[DrugInd].Carried;
CanCarry=Play->CoatSize;
- prstr=FormatPrice(Play->Drugs[DrugInd].Price);
- g_string_sprintf(text,"at %s",prstr);
- g_free(prstr);
+ dpg_string_sprintf(text,"at %P",Play->Drugs[DrugInd].Price);
SetDlgItemText(hwnd,ST_DEALPRICE,text->str);
g_string_sprintf(text,"You are currently carrying %d %s",
t@@ -773,20 +758,17 @@ BOOL CALLBACK TransferWndProc(HWND hwnd,UINT msg,UINT wParam,
switch(msg) {
case WM_INITDIALOG:
Type=(char)lParam;
- prstr=FormatPrice(ClientData.Play->Cash);
- text=g_strdup_printf("Cash: %s",prstr);
+ text=dpg_strdup_printf("Cash: %P",ClientData.Play->Cash);
SetDlgItemText(hwnd,ST_MONEY,text);
g_free(text); g_free(prstr);
if (Type==C_BANK) {
CheckDlgButton(hwnd,RB_WITHDRAW,BST_CHECKED);
- prstr=FormatPrice(ClientData.Play->Bank);
- text=g_strdup_printf("Bank: %s",prstr);
+ text=dpg_strdup_printf("Bank: %P",ClientData.Play->Bank);
} else {
- prstr=FormatPrice(ClientData.Play->Debt);
- text=g_strdup_printf("Debt: %s",prstr);
+ text=dpg_strdup_printf("Debt: %P",ClientData.Play->Debt);
}
SetDlgItemText(hwnd,ST_BANK,text);
- g_free(text); g_free(prstr);
+ g_free(text);
return TRUE;
case WM_COMMAND:
if (HIWORD(wParam)==BN_CLICKED) switch(LOWORD(wParam)) { |