From: Markus Armbruster Date: Sat, 5 Aug 2017 19:14:20 +0000 (+0200) Subject: Spell ID and UID consistently all-caps X-Git-Tag: v4.4.0~46 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=a1ba346736373de17035b91bc55ad08a72d9e073 Spell ID and UID consistently all-caps Signed-off-by: Markus Armbruster --- diff --git a/doc/CHANGES4.X b/doc/CHANGES4.X index f3a4ebf4b..c182fdf7b 100644 --- a/doc/CHANGES4.X +++ b/doc/CHANGES4.X @@ -19,11 +19,11 @@ Changes to Empire 4.3.33 - Wed May 20 18:17:43 UTC 2015 - Don't disclose that the torpedo's path to the target is blocked by land when the target is out of range. Screwed up in 4.2.2. - When a submarine gets hit by return fire after firing its deck - gun, the defender again learns the submarine's uid and type, just + gun, the defender again learns the submarine's UID and type, just like for surface ships. This is how it worked before Empire 2.3. - When a submarine gets hit by return fire after launching a - torpedo, the defender again learns the submarine's uid. Before - Empire 2.3, he learned uid and type. + torpedo, the defender again learns the submarine's UID. Before + Empire 2.3, he learned UID and type. - Print "Kaboom" even when the target is out of range. - Always clear missions when firing guns or dropping depth charges. Screwed up when missions were added in Chainsaw. @@ -42,7 +42,7 @@ Changes to Empire 4.3.33 - Wed May 20 18:17:43 UTC 2015 * Fix news to report the actual owner of ships sunk by return torpedoes instead of POGO. Screwed up when return torpedoes were added in Chainsaw. - * Don't disclose uid, type and owner of torpedoed submarines. The + * Don't disclose UID, type and owner of torpedoed submarines. The latter leaked through the news. * Changes to bomb: - Fix damage to mobility when bombing planes. Has always been @@ -649,7 +649,7 @@ Changes to Empire 4.3.28 - Sat Jul 16 11:30:53 UTC 2011 * Remove option TRADESHIPS. Deities can customize the ship table to enable trade ships. * Configuration table changes (builtin and custom): - - Rows must be in ascending uid order. + - Rows must be in ascending UID order. - Omitting rows in tables item, sect-chr and infrastructure is no longer permitted. - Custom tables now replace the builtin table completely. Before, @@ -855,7 +855,7 @@ Changes to Empire 4.3.26 - Mon May 24 16:37:40 UTC 2010 * Fix retreat and lretreat condition 'c'. Broken in 4.3.16. * coastwatch and skywatch could see too far. Up to one sector for practical radar ranges. - * skywatch now reports satellite uids. The uid is required for + * skywatch now reports satellite UIDs. The UID is required for launching a-sats since 4.3.23. * Fix client not to send an empty line of input before aborting the command on player interrupt (normally ^C). @@ -1174,7 +1174,7 @@ Changes to Empire 4.3.20 - Fri Feb 20 18:14:20 UTC 2009 land units anymore. Loading stuff in foreign sectors was prohibited already for ships. - lload and lunload now work on foreign land units only when - they're explicitly named by uid. This matches behavior of load + they're explicitly named by UID. This matches behavior of load and unload. - Fix to test relations of foreign object's owner to player instead of the other way round. @@ -1230,7 +1230,7 @@ Changes to Empire 4.3.19 - Sun Dec 7 23:15:34 UTC 2008 * Improved nightly build, with additional tests. Changes to Empire 4.3.18 - Sat Oct 18 18:39:17 UTC 2008 - * Fix building of planes, land units and nukes with uids that have + * Fix building of planes, land units and nukes with UIDs that have never been used before. This could crash the server on some systems in certain states. Broken in 4.3.17. * Improved nightly build, with restructured and extended tests. @@ -1667,8 +1667,8 @@ Changes to Empire 4.3.11 - Tue Jan 1 18:57:38 UTC 2008 * New sector selector elev. It's set by fairland, but has no effect on the game. It can be useful for deities to customize a world created by fairland. - * The client now copes with ids greater than 15. The Empire - protocol currently uses 14 ids. + * The client now copes with IDs greater than 15. The Empire + protocol currently uses 14 IDs. * Rewrite the client's code for reading server output during login. The old code could write one byte beyond the end of the buffer (theoretically a remote hole), got confused by long lines, and @@ -2598,7 +2598,7 @@ Changes to Empire 4.2.20 - Tue Mar 22 21:07:18 UTC 2005 population limit. * neweff miscalculated work when the population limit exceeded 999. * Fix capping of avail when a big city is torn down. - * Fix a bug in fire that allowed players to find all submarine uids. + * Fix a bug in fire that allowed players to find all submarine UIDs. * Maximum sector population is no longer hardcoded, and now covered by xdump. Option RES_POP now affects mountains and plains as well. From Ray Hyatt. diff --git a/doc/clients-howto b/doc/clients-howto index b3d512d53..e70a2c8a0 100644 --- a/doc/clients-howto +++ b/doc/clients-howto @@ -17,13 +17,13 @@ The server sends lines of output. Each output line starts with an identification string, followed by a space, then arbitrary text, then a line feed. -Identification strings encode small integers called output ids as base +Identification strings encode small integers called output IDs as base 36 numbers. Characters '0' to '9' represent digits 0 to 9, and 'a' to -'z' represent 10..35, as do 'A' to 'Z'. Symbolic names for ids are +'z' represent 10..35, as do 'A' to 'Z'. Symbolic names for IDs are defined in proto.h. -empire-client versions before version 4.3.11 parse large output ids -incorrectly. Such ids do not currently occur. +empire-client versions before version 4.3.11 parse large output IDs +incorrectly. Such IDs do not currently occur. Clients shall be able to safely handle output lines of arbitrary length. Naturally, a client may not be able to handle a sufficiently @@ -185,7 +185,7 @@ empire-client signals `EOF' when it encounters an end-of-file condition while reading player input. It signals `interrupt' when it catches SIGINT, which is normally triggered by Ctrl-C. -The following ids occur: +The following IDs occur: * Command prompt C_PROMPT @@ -351,12 +351,12 @@ The following ids occur: The security considerations on C_PIPE apply to C_REDIR as well. -* Other ids +* Other IDs - Other ids do not occur currently. Clients shall deal gracefully - with ids they don't know. + Other IDs do not occur currently. Clients shall deal gracefully + with IDs they don't know. - empire-client treats unknown ids like C_DATA. Versions before + empire-client treats unknown IDs like C_DATA. Versions before 4.3.11 prepend "Aborted\n" to C_ABORT lines, and "Error; " to C_CMDERR and C_BADCMD lines for historical reasons. diff --git a/doc/xdump b/doc/xdump index 4df9739bb..4d69b2e63 100644 --- a/doc/xdump +++ b/doc/xdump @@ -492,7 +492,7 @@ equivalent to a newline. Rationale: Follow econfig syntax. -Tables with a record uid in the leftmost field can be `split +Tables with a record UID in the leftmost field can be `split vertically' into multiple parts. Each part must contain the same set of records. The leftmost field must be repeated in each part. Other fields may be repeated. Repeated fields must be the same in all @@ -501,7 +501,7 @@ a table that is not split. Rationale: This is to let you avoid long lines. Line continuation syntax would be simpler, but turns out to be illegible. Requiring -record uid is not technically necessary, as counting records works the +record UID is not technically necessary, as counting records works the same whether a table is split or not. Except humans can't count. Perhaps this should be a recommendation for use rather than part of the language. diff --git a/include/file.h b/include/file.h index a0e767664..d102cfa40 100644 --- a/include/file.h +++ b/include/file.h @@ -55,7 +55,7 @@ struct empfile { /* flags bits EFF_MEM, EFF_PRIVATE, EFF_NOTIME also fixed then */ /* Members whose values may vary throughout operation */ - int baseid; /* id of first entry in cache */ + int baseid; /* ID of first entry in cache */ int cids; /* # entries in cache */ int fids; /* # entries in table */ int fd; /* file descriptor, -1 if not open */ @@ -68,13 +68,13 @@ struct empfile { */ void (*oninit)(void *elt); /* - * Called after read. @id is the element id, and @elt is the + * Called after read. @id is the element ID, and @elt is the * element read. May modify the element. Modifications are * visible to caller of ef_read(), but have no effect on the file. */ void (*postread)(int id, void *elt); /* - * Called before write. @id is the element id, @old is the + * Called before write. @id is the element ID, @old is the * element being updated (null unless it is cached) and @elt is * the element being written. May modify the element. * Modifications will be visible to caller of ef_write() and are diff --git a/include/land.h b/include/land.h index 1bcaae9d5..b6c3e9283 100644 --- a/include/land.h +++ b/include/land.h @@ -50,7 +50,7 @@ struct lndstr { signed ef_type: 8; unsigned lnd_seqno: 12; unsigned lnd_generation: 12; - int lnd_uid; /* unit id (land #) */ + int lnd_uid; /* unit ID (land #) */ time_t lnd_timestamp; /* Last time this unit was touched */ natid lnd_own; /* owner's country num */ coord lnd_x; /* x location in abs coords */ @@ -65,7 +65,7 @@ struct lndstr { short lnd_mission; /* mission code */ short lnd_radius; /* mission radius */ /* end of part matching struct empobj */ - int lnd_ship; /* uid of transporting ship, or -1 */ + int lnd_ship; /* UID of transporting ship, or -1 */ signed char lnd_harden; /* fortification */ short lnd_retreat; /* retreat percentage */ int lnd_rflags; /* When do I retreat? */ @@ -74,7 +74,7 @@ struct lndstr { short lnd_item[I_MAX+1]; /* amount of items on board */ short lnd_pstage; /* plague stage */ short lnd_ptime; /* how many ETUs remain in this stage */ - int lnd_land; /* uid of transporting land unit, or -1 */ + int lnd_land; /* UID of transporting land unit, or -1 */ short lnd_access; /* Last tick mob was updated (MOB_ACCESS) */ }; diff --git a/include/lost.h b/include/lost.h index 46b27d4f9..903bbc9fb 100644 --- a/include/lost.h +++ b/include/lost.h @@ -46,7 +46,7 @@ struct loststr { natid lost_owner; /* Who lost it */ /* end of part matching struct empobj */ short lost_type; /* Type of thing (ship, plane, nuke, land, sector) */ - int lost_id; /* uid of lost thing (0 for sector) */ + int lost_id; /* UID of lost thing (0 for sector) */ coord lost_x; coord lost_y; }; diff --git a/include/nsc.h b/include/nsc.h index fb5c3ae7b..91217661d 100644 --- a/include/nsc.h +++ b/include/nsc.h @@ -60,7 +60,7 @@ enum nsc_type { NSC_FLOAT, /* float */ NSC_STRINGY, /* char[] */ /* aliases, must match typedefs */ - NSC_NATID = NSC_UCHAR /* nation id */ + NSC_NATID = NSC_UCHAR /* nation ID */ }; /* Is TYPE a promoted value type? */ diff --git a/include/nuke.h b/include/nuke.h index 94beb94b6..10151411c 100644 --- a/include/nuke.h +++ b/include/nuke.h @@ -46,7 +46,7 @@ struct nukstr { signed ef_type: 8; unsigned nuk_seqno: 12; unsigned nuk_generation: 12; - int nuk_uid; /* unit id (nuke #) */ + int nuk_uid; /* unit ID (nuke #) */ time_t nuk_timestamp; /* Last time this nuke was touched */ natid nuk_own; coord nuk_x, nuk_y; /* current loc of device */ @@ -60,7 +60,7 @@ struct nukstr { short nuk_mission; /* mission code, unused */ short nuk_radius; /* mission radius, unused */ /* end of part matching struct empobj */ - int nuk_plane; /* uid of transporting plane, or -1 */ + int nuk_plane; /* UID of transporting plane, or -1 */ }; struct nchrstr { diff --git a/include/plane.h b/include/plane.h index b745d1b7b..b85f158c7 100644 --- a/include/plane.h +++ b/include/plane.h @@ -49,7 +49,7 @@ struct plnstr { signed ef_type: 8; unsigned pln_seqno: 12; unsigned pln_generation: 12; - int pln_uid; /* unit id (plane #) */ + int pln_uid; /* unit ID (plane #) */ time_t pln_timestamp; /* Last time this plane was touched */ natid pln_own; /* owning country */ coord pln_x; /* plane x-y */ @@ -67,8 +67,8 @@ struct plnstr { /* end of part matching struct empobj */ unsigned char pln_range; /* total distance, not radius */ signed char pln_harden; /* for missiles */ - int pln_ship; /* uid of carrier, or -1 */ - int pln_land; /* uid of transporting land unit, or -1 */ + int pln_ship; /* UID of carrier, or -1 */ + int pln_land; /* UID of transporting land unit, or -1 */ int pln_flags; /* State of the plane */ short pln_access; /* Last tick mob was updated (MOB_ACCESS) */ float pln_theta; /* position in orbital sine wave */ diff --git a/include/player.h b/include/player.h index 3d94f55b3..60691e669 100644 --- a/include/player.h +++ b/include/player.h @@ -84,7 +84,7 @@ struct player { int aborted; /* command aborted? */ int got_ctld; /* EOF cookie received? */ int recvfail; /* #recvclient() failures */ - int curid; /* for pr, cur. line's id, -1 none */ + int curid; /* for pr, cur. line's ID, -1 none */ char *map; /* pointer to in-mem map */ char *bmap; /* pointer to in-mem bmap */ }; diff --git a/include/sect.h b/include/sect.h index 8abfc0500..102d3bbe9 100644 --- a/include/sect.h +++ b/include/sect.h @@ -57,10 +57,10 @@ struct sctstr { unsigned char sct_off; /* Should this sector produce? */ /* end of part matching struct empobj */ unsigned char sct_loyal; /* updates until civilans "converted" */ - unsigned char sct_terr; /* territory 0 id # of sector */ - unsigned char sct_terr1; /* territory 1 id # of sector */ - unsigned char sct_terr2; /* territory 2 id # of sector */ - unsigned char sct_terr3; /* territory 3 id # of sector */ + unsigned char sct_terr; /* territory 0 number */ + unsigned char sct_terr1; /* territory 1 number */ + unsigned char sct_terr2; /* territory 2 number */ + unsigned char sct_terr3; /* territory 3 number */ unsigned char sct_dterr; /* deity's territory # */ coord sct_dist_x; /* Dist sector */ coord sct_dist_y; diff --git a/info/Empire4.t b/info/Empire4.t index 92541d269..a5b22cfa4 100644 --- a/info/Empire4.t +++ b/info/Empire4.t @@ -28,11 +28,11 @@ Changes to Empire 4.3.33 - Wed May 20 18:17:43 UTC 2015 - Don't disclose that the torpedo's path to the target is blocked by land when the target is out of range. Screwed up in 4.2.2. - When a submarine gets hit by return fire after firing its deck - gun, the defender again learns the submarine's uid and type, just + gun, the defender again learns the submarine's UID and type, just like for surface ships. This is how it worked before Empire 2.3. - When a submarine gets hit by return fire after launching a - torpedo, the defender again learns the submarine's uid. Before - Empire 2.3, he learned uid and type. + torpedo, the defender again learns the submarine's UID. Before + Empire 2.3, he learned UID and type. - Print "Kaboom" even when the target is out of range. - Always clear missions when firing guns or dropping depth charges. Screwed up when missions were added in Chainsaw. @@ -51,7 +51,7 @@ Changes to Empire 4.3.33 - Wed May 20 18:17:43 UTC 2015 * Fix news to report the actual owner of ships sunk by return torpedoes instead of POGO. Screwed up when return torpedoes were added in Chainsaw. - * Don't disclose uid, type and owner of torpedoed submarines. The + * Don't disclose UID, type and owner of torpedoed submarines. The latter leaked through the news. * Changes to bomb: - Fix damage to mobility when bombing planes. Has always been @@ -658,7 +658,7 @@ Changes to Empire 4.3.28 - Sat Jul 16 11:30:53 UTC 2011 * Remove option TRADESHIPS. Deities can customize the ship table to enable trade ships. * Configuration table changes (builtin and custom): - - Rows must be in ascending uid order. + - Rows must be in ascending UID order. - Omitting rows in tables item, sect-chr and infrastructure is no longer permitted. - Custom tables now replace the builtin table completely. Before, @@ -864,7 +864,7 @@ Changes to Empire 4.3.26 - Mon May 24 16:37:40 UTC 2010 * Fix retreat and lretreat condition 'c'. Broken in 4.3.16. * coastwatch and skywatch could see too far. Up to one sector for practical radar ranges. - * skywatch now reports satellite uids. The uid is required for + * skywatch now reports satellite UIDs. The UID is required for launching a-sats since 4.3.23. * Fix client not to send an empty line of input before aborting the command on player interrupt (normally ^C). @@ -1183,7 +1183,7 @@ Changes to Empire 4.3.20 - Fri Feb 20 18:14:20 UTC 2009 land units anymore. Loading stuff in foreign sectors was prohibited already for ships. - lload and lunload now work on foreign land units only when - they're explicitly named by uid. This matches behavior of load + they're explicitly named by UID. This matches behavior of load and unload. - Fix to test relations of foreign object's owner to player instead of the other way round. @@ -1239,7 +1239,7 @@ Changes to Empire 4.3.19 - Sun Dec 7 23:15:34 UTC 2008 * Improved nightly build, with additional tests. Changes to Empire 4.3.18 - Sat Oct 18 18:39:17 UTC 2008 - * Fix building of planes, land units and nukes with uids that have + * Fix building of planes, land units and nukes with UIDs that have never been used before. This could crash the server on some systems in certain states. Broken in 4.3.17. * Improved nightly build, with restructured and extended tests. @@ -1676,8 +1676,8 @@ Changes to Empire 4.3.11 - Tue Jan 1 18:57:38 UTC 2008 * New sector selector elev. It's set by fairland, but has no effect on the game. It can be useful for deities to customize a world created by fairland. - * The client now copes with ids greater than 15. The Empire - protocol currently uses 14 ids. + * The client now copes with IDs greater than 15. The Empire + protocol currently uses 14 IDs. * Rewrite the client's code for reading server output during login. The old code could write one byte beyond the end of the buffer (theoretically a remote hole), got confused by long lines, and @@ -2607,7 +2607,7 @@ Changes to Empire 4.2.20 - Tue Mar 22 21:07:18 UTC 2005 population limit. * neweff miscalculated work when the population limit exceeded 999. * Fix capping of avail when a big city is torn down. - * Fix a bug in fire that allowed players to find all submarine uids. + * Fix a bug in fire that allowed players to find all submarine UIDs. * Maximum sector population is no longer hardcoded, and now covered by xdump. Option RES_POP now affects mountains and plains as well. From Ray Hyatt. diff --git a/info/Moving.t b/info/Moving.t index 13f0a2f54..3d2dee71f 100644 --- a/info/Moving.t +++ b/info/Moving.t @@ -28,7 +28,7 @@ Note that in the case of load, lload, unload, tend, and lunload, the way you specify whether you are moving a commodity, land unit or plane is by using the word "land" or "plane" instead of the commodity name in the field. If is "land" or "plane", then is -the unit or plane id. So for example, to load ship #1 with land unit +the unit or plane ID. So for example, to load ship #1 with land unit #2, you would type: .EX "load land 1 2" .s1 diff --git a/info/Selector.t b/info/Selector.t index c3ed1a10f..33022a022 100644 --- a/info/Selector.t +++ b/info/Selector.t @@ -96,7 +96,7 @@ type of unit (e.g. cavalry or frigate) .L tech tech level the unit was built at .L uid -unit id number +unit ID number .L group fleet/wing/army .L opx diff --git a/info/lost.t b/info/lost.t index 2e180ea55..189713676 100644 --- a/info/lost.t +++ b/info/lost.t @@ -7,9 +7,9 @@ database for your country. .s1 All lost items are timestamped at the time they were lost. If you had a previously lost item in the database, and then build a -new item of the same type with the same id, or regain an item of the +new item of the same type with the same ID, or regain an item of the same type with the same -id, it is removed from the database. This is done because the new item +ID, it is removed from the database. This is done because the new item will now show up in the other dump commands, and is no longer lost. .s1 Lost items are kept in the database for 48 hours (default) but may @@ -48,7 +48,7 @@ The type of lost item. They are as follows: 4 - Nuclear stockpile .L id The # of the ship, plane, land unit or nuke. All of these items -are identified by id. Sectors are identified by x and y. +are identified by ID. Sectors are identified by x and y. .L x The x coordinate of the lost item when it was lost. .L y diff --git a/scripts/xdump.pl b/scripts/xdump.pl index c4c622022..9710ecd6a 100755 --- a/scripts/xdump.pl +++ b/scripts/xdump.pl @@ -32,11 +32,11 @@ use Dumpvalue; # Map table name to meta table reference my %meta_by_name = (); -# Map table uid to meta table reference +# Map table UID to meta table reference my @meta_by_uid = (); # Map table name to table reference my %table_by_name = (); -# Map table uid to table reference +# Map table UID to table reference my @table_by_uid = (); # The meta meta table @@ -67,7 +67,7 @@ my $dumper = new Dumpvalue; # xdump meta table $meta_by_name{table} = []; parse_xdump(send_cmd('xdump meta table'), undef); - # table's first field is record uid, and its table field is the table uid: + # table's first field is record UID, and its table field is the table uid: my $tuid = $meta_by_name{table}->[0]->{table}; $meta_by_uid[$tuid] = $meta_by_name{table}; @@ -78,7 +78,7 @@ my $dumper = new Dumpvalue; # complete work for xdump meta meta { - # find the meta table uid + # find the meta table UID my ($meta) = grep { defined $_ && $_->{name} eq 'meta' } @{$table_by_name{table}}; my $tuid = $meta->{uid}; @@ -91,7 +91,7 @@ my $dumper = new Dumpvalue; { # lookup record with name => 'type' in meta meta: my ($mmt) = grep {$_->{name} eq 'type'} @meta_meta; - # its table field is uid of table meta-type: + # its table field is UID of table meta-type: my $tuid = $mmt->{table}; # lookup table meta-type's name: my $name = $table_by_name{table}->[$tuid]->{name}; @@ -215,7 +215,7 @@ sub eval_fld { } sub has_record_uid { - # a table has record uids if the first field's table is the table's uid + # a table has record UIDs if the first field's table is the table's UID my ($tuid) = @_; die unless defined $tuid; die unless defined $meta_by_uid[$tuid]; diff --git a/src/client/expect.c b/src/client/expect.c index a74922b97..c8925e799 100644 --- a/src/client/expect.c +++ b/src/client/expect.c @@ -84,7 +84,7 @@ parseid(char *line) id = strtol(line, &end, 36); if (end == line || *end != ' ') { - fprintf(stderr, "Malformed id in line %s", line); + fprintf(stderr, "Malformed ID in line %s", line); id = -1; } if (id > C_LAST) diff --git a/src/client/play.c b/src/client/play.c index fbb00fffc..a33541ab3 100644 --- a/src/client/play.c +++ b/src/client/play.c @@ -332,10 +332,10 @@ recv_output(int sock) * simple state machine. * Initial state is SCANNING_ID. * In state SCANNING_ID, buffer the character. If it's a space, - * decode the id that has been buffered, and enter state BUFFERING + * decode the ID that has been buffered, and enter state BUFFERING * or COPYING depending on its value. * In state BUFFERING, buffer the character. If it's newline, - * pass id and buffered text to servercmd(), then enter state + * pass ID and buffered text to servercmd(), then enter state * SCANNING_ID. * In state COPYING, pass the character to outch(). If it's * newline, enter state SCANNING_ID. @@ -382,7 +382,7 @@ recv_output(int sock) state = BUFFERING; break; default: - /* unknown or unexpected id, treat like C_DATA */ + /* unknown or unexpected ID, treat like C_DATA */ case C_DATA: state = COPYING; break; diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index c805489a8..d74c4b656 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -143,7 +143,7 @@ launch_as(struct plnstr *pp) || !pln_is_in_orbit(&plane)) { pr("No such satellite exists!\n"); return RET_FAIL; - /* Can be abused to find satellite ids. Tolerable. */ + /* Can be abused to find satellite IDs. Tolerable. */ } if (mapdist(pp->pln_x, pp->pln_y, plane.pln_x, plane.pln_y) diff --git a/src/lib/common/cargo.c b/src/lib/common/cargo.c index ee29eabe7..a13fb0f48 100644 --- a/src/lib/common/cargo.c +++ b/src/lib/common/cargo.c @@ -46,7 +46,7 @@ struct clink { * Cargo lists * * Persistent game state encodes "who carries what" by storing the - * carrier uid in the cargo. Cargo lists augment that: they store + * carrier UID in the cargo. Cargo lists augment that: they store * lists of cargo for each carrier. * * clink[TYPE] points to an array of cargo list links. The array has @@ -56,10 +56,10 @@ struct clink { * EF_NUKE. Other slots of clink[] and nclink[] are unused and remain * zero. * - * clink[TYPE][UID].next is the uid of the next unit of the same type + * clink[TYPE][UID].next is the UID of the next unit of the same type * in the same carrier, -1 if none. * - * clink[TYPE][UID].head[CARGO-EF_PLANE] is the uid of the first unit + * clink[TYPE][UID].head[CARGO-EF_PLANE] is the UID of the first unit * of type CARGO carried by this unit, -1 if none. The next unit, if * any, is clink[CARGO][clink[TYPE][UID].head[CARGO-EF_PLANE]].next, * and so forth. @@ -99,7 +99,7 @@ clink_init(struct clink *cl) } /* - * Check whether *@uidp is a valid uid for file type @type. + * Check whether *@uidp is a valid UID for file type @type. */ static void clink_check1(int *uidp, int type) @@ -130,7 +130,7 @@ clink_check(int type) } /* - * Add to @cl's cargo list for type @type the uid @uid. + * Add to @cl's cargo list for type @type the UID @uid. * @uid must not be on any cargo list already. */ static void @@ -149,7 +149,7 @@ clink_add(struct clink *cl, int type, int uid) } /* - * Remove from @cl's cargo list for type @type the uid @uid. + * Remove from @cl's cargo list for type @type the UID @uid. * @uid must be on that cargo list. */ static void @@ -176,8 +176,8 @@ clink_rem(struct clink *cl, int type, int uid) /* * Update cargo lists for a change of @cargo's carrier. - * Carrier is of type @type, and changes from uid @old to @new. - * Negative uids mean no carrier. + * Carrier is of type @type, and changes from UID @old to @new. + * Negative UIDs mean no carrier. */ void unit_carrier_change(struct empobj *cargo, int type, int old, int new) @@ -192,8 +192,8 @@ unit_carrier_change(struct empobj *cargo, int type, int old, int new) /* * Update cargo lists for a change of @pp's carrier. - * Carrier is of type @type, and changes from uid @old to @new. - * Negative uids mean no carrier. + * Carrier is of type @type, and changes from UID @old to @new. + * Negative UIDs mean no carrier. */ void pln_carrier_change(struct plnstr *pp, int type, int old, int new) @@ -203,8 +203,8 @@ pln_carrier_change(struct plnstr *pp, int type, int old, int new) /* * Update cargo lists for a change of @lp's carrier. - * Carrier is of type @type, and changes from uid @old to @new. - * Negative uids mean no carrier. + * Carrier is of type @type, and changes from UID @old to @new. + * Negative UIDs mean no carrier. */ void lnd_carrier_change(struct lndstr *lp, int type, int old, int new) @@ -214,8 +214,8 @@ lnd_carrier_change(struct lndstr *lp, int type, int old, int new) /* * Update cargo lists for a change of @np's carrier. - * Carrier is of type @type, and changes from uid @old to @new. - * Negative uids mean no carrier. + * Carrier is of type @type, and changes from UID @old to @new. + * Negative UIDs mean no carrier. */ void nuk_carrier_change(struct nukstr *np, int type, int old, int new) @@ -299,7 +299,7 @@ unit_onresize(int type) /* * Find first unit on a carrier's cargo list for file type @cargo_type. * Search carrier @uid of type @type. - * Return first unit's uid, or -1 if the carrier isn't carrying such + * Return first unit's UID, or -1 if the carrier isn't carrying such * units. */ int @@ -320,7 +320,7 @@ unit_cargo_first(int type, int uid, int cargo_type) /* * Find the next unit on a cargo list for file type @cargo_type. * Get the unit after @cargo_uid. - * Return its uid, or -1 if there are no more on this list. + * Return its UID, or -1 if there are no more on this list. */ int unit_cargo_next(int cargo_type, int cargo_uid) @@ -333,7 +333,7 @@ unit_cargo_next(int cargo_type, int cargo_uid) } /* - * If @sp carries planes, return the uid of the first one, else -1. + * If @sp carries planes, return the UID of the first one, else -1. */ int pln_first_on_ship(struct shpstr *sp) @@ -342,7 +342,7 @@ pln_first_on_ship(struct shpstr *sp) } /* - * If @lp carries planes, return the uid of the first one, else -1. + * If @lp carries planes, return the UID of the first one, else -1. */ int pln_first_on_land(struct lndstr *lp) @@ -352,7 +352,7 @@ pln_first_on_land(struct lndstr *lp) /* * Find the next plane on the same carrier as plane#@uid. - * Return its uid, or -1 if there are no more. + * Return its UID, or -1 if there are no more. */ int pln_next_on_unit(int uid) @@ -361,7 +361,7 @@ pln_next_on_unit(int uid) } /* - * If @sp carries land units, return the uid of the first one, else -1. + * If @sp carries land units, return the UID of the first one, else -1. */ int lnd_first_on_ship(struct shpstr *sp) @@ -370,7 +370,7 @@ lnd_first_on_ship(struct shpstr *sp) } /* - * If @lp carries land units, return the uid of the first one, else -1. + * If @lp carries land units, return the UID of the first one, else -1. */ int lnd_first_on_land(struct lndstr *lp) @@ -380,7 +380,7 @@ lnd_first_on_land(struct lndstr *lp) /* * Find the next land unit on the same carrier as land#@uid. - * Return its uid, or -1 if there are no more. + * Return its UID, or -1 if there are no more. */ int lnd_next_on_unit(int uid) @@ -389,7 +389,7 @@ lnd_next_on_unit(int uid) } /* - * If @pp carries a nuke, return its uid, else -1. + * If @pp carries a nuke, return its UID, else -1. */ int nuk_on_plane(struct plnstr *pp) diff --git a/src/lib/common/ef_verify.c b/src/lib/common/ef_verify.c index c5fc7cfaf..cbda1d408 100644 --- a/src/lib/common/ef_verify.c +++ b/src/lib/common/ef_verify.c @@ -175,7 +175,7 @@ verify_row(int type, int row) continue; } if (ca[i].ca_table == type && i == 0) { - /* uid */ + /* UID */ if (val.val_as.lng != row) { verify_fail(type, row, &ca[i], j, "value is %ld instead of %d", diff --git a/src/lib/common/file.c b/src/lib/common/file.c index 4b5ef527c..c1a1f3a33 100644 --- a/src/lib/common/file.c +++ b/src/lib/common/file.c @@ -576,10 +576,10 @@ ef_write(int type, int id, void *from) } /* - * Change element id. + * Change element ID. * @buf is an element of table @type. * @id is its new element ID. - * If table is EFF_TYPED, change id and sequence number stored in @buf. + * If table is EFF_TYPED, change ID and sequence number stored in @buf. * Else do nothing. */ void diff --git a/src/lib/common/pathfind.c b/src/lib/common/pathfind.c index 54593a515..d9fde4eac 100644 --- a/src/lib/common/pathfind.c +++ b/src/lib/common/pathfind.c @@ -57,7 +57,7 @@ static char *bufrotate(char *buf, size_t bufsz, size_t i); */ /* - * Array of sector data, indexed by sector uid + * Array of sector data, indexed by sector UID * * We need to store a few values per sector visited by the path * search. An array is the stupidest data structure that could @@ -98,7 +98,7 @@ static struct pf_map *pf_map; */ struct pf_heap { - int uid; /* sector uid and */ + int uid; /* sector UID and ... */ coord x, y; /* coordinates, @uid == XYOFFSET(@x, @y) */ double cost; /* cost from source */ }; @@ -131,7 +131,7 @@ static double pf_sumcost; #endif /* !PATH_FIND_STATS */ #ifndef NDEBUG /* silence "not used" warning */ -/* Is sector with uid @uid open? */ +/* Is sector with UID @uid open? */ static int pf_is_open(int uid) { @@ -139,7 +139,7 @@ pf_is_open(int uid) } #endif -/* Is sector with uid @uid closed? */ +/* Is sector with UID @uid closed? */ static int pf_is_closed(int uid) { @@ -150,7 +150,7 @@ pf_is_closed(int uid) return pf_map[uid].visit > pf_visit; } -/* Is sector with uid @uid unvisited? */ +/* Is sector with UID @uid unvisited? */ static int pf_is_unvisited(int uid) { @@ -234,7 +234,7 @@ pf_sift_up(int n) /* * Open the unvisited sector @x,@y. - * @uid is sector uid, it equals XYOFFSET(@x,@y). + * @uid is sector UID, it equals XYOFFSET(@x,@y). * Cheapest path from source comes from direction @dir and has cost @cost. */ static void @@ -283,7 +283,7 @@ pf_close(void) /* silence "not used" warning */ #ifdef PATH_FIND_DEBUG /* - * Return cost from source to sector with uid @uid. + * Return cost from source to sector with UID @uid. * It must be visited, i.e. open or closed. */ static double @@ -327,7 +327,7 @@ y_in_dir(coord y, int dir) /* * Set the current source and cost function. * @sx,@sy is the source. - * The cost to enter the sector with uid ID is @cost(@actor, ID). + * The cost to enter the sector with UID ID is @cost(@actor, ID). * Negative value means the sector can't be entered. */ static void diff --git a/src/lib/empthread/ntthread.c b/src/lib/empthread/ntthread.c index 73868dad1..c53c9892e 100644 --- a/src/lib/empthread/ntthread.c +++ b/src/lib/empthread/ntthread.c @@ -448,7 +448,7 @@ empth_create(void (*entry)(void *), int size, int flags, goto bad; } - loc_debug("new thread id is %ld", pThread->ulThreadID); + loc_debug("new thread ID is %ld", pThread->ulThreadID); empth_yield(); return pThread; diff --git a/src/lib/empthread/pthread.c b/src/lib/empthread/pthread.c index 392897f3d..9af22598d 100644 --- a/src/lib/empthread/pthread.c +++ b/src/lib/empthread/pthread.c @@ -58,7 +58,7 @@ struct empth_t { void *ud; /* user data */ int wakeup; void (*ep)(void *); /* entry point */ - pthread_t id; /* thread id */ + pthread_t id; /* thread ID */ }; struct empth_rwlock_t { @@ -214,7 +214,7 @@ empth_create(void (*entry)(void *), int size, int flags, logerror("can not create thread: %s: %s", name, strerror(eno)); goto bad; } - empth_status("new thread id is %ld", (long)t); + empth_status("new thread ID is %ld", (long)t); empth_yield(); return ctx; diff --git a/src/lib/subs/nreport.c b/src/lib/subs/nreport.c index d30f5c5ad..0e78166b9 100644 --- a/src/lib/subs/nreport.c +++ b/src/lib/subs/nreport.c @@ -105,7 +105,7 @@ delete_old_news(void) if (news.nws_vrb == 0 || news.nws_when >= expiry_time) break; } - /* news id 0..I-1 have expired */ + /* news ID 0..I-1 have expired */ CANT_HAPPEN(i > news_tail); /* no items to delete if I is equal zero */ if (i == 0) diff --git a/src/lib/subs/pr.c b/src/lib/subs/pr.c index 4a5fefb96..b574f0fdf 100644 --- a/src/lib/subs/pr.c +++ b/src/lib/subs/pr.c @@ -43,9 +43,9 @@ * without yielding the processor. * * Each line of output starts with an identification character - * encoding the output id, followed by space. Ids less than 10 are - * encoded as decimal digits, and larger ids as lower case letters, - * starting with 'a'. Symbolic names for ids are defined in proto.h. + * encoding the output ID, followed by space. Ids less than 10 are + * encoded as decimal digits, and larger IDs as lower case letters, + * starting with 'a'. Symbolic names for IDs are defined in proto.h. */ #include @@ -108,7 +108,7 @@ uprnf(char *buf) } /* - * Send some text to @p with id @id, line-buffered. + * Send some text to @p with ID @id, line-buffered. * Format text to send using printf-style @format and optional * arguments. It is assumed to be already user text. Plain ASCII and * text received from the same player are fine, for anything else the @@ -212,7 +212,7 @@ pr_wall(char *format, ...) /* * Send @id text @buf to @pl, line-buffered. * @buf is user text. - * If a partial line with different id is buffered, terminate it with + * If a partial line with different ID is buffered, terminate it with * a newline first. */ static void @@ -251,7 +251,7 @@ pr_player(struct player *pl, int id, char *buf) /* * Send @id text @buf to @pl, line-buffered. * This function translates from normal text to user text. - * If a partial line with different id is buffered, terminate it with + * If a partial line with different ID is buffered, terminate it with * a newline first. */ static void @@ -304,7 +304,7 @@ upr_player(struct player *pl, int id, char *buf) } /* - * Send id @n to @pl. + * Send ID @n to @pl. * This runs always at the beginning of a line. */ static void diff --git a/src/lib/subs/snxtitem.c b/src/lib/subs/snxtitem.c index da14e9a84..05863ec61 100644 --- a/src/lib/subs/snxtitem.c +++ b/src/lib/subs/snxtitem.c @@ -218,7 +218,7 @@ snxtitem_list(struct nstr_item *np, int type, int *list, int len) /* * Initialize @np to iterate over the items of type @type in a carrier. - * The carrier has file type @carrier_type and uid @carrier_uid. + * The carrier has file type @carrier_type and UID @carrier_uid. * Note: you can take an item gotten with nxtitem() off its carrier * without disturbing the iterator. Whether the iterator will pick up * stuff you load onto the carrier during iteration is unspecified.