"cause" of death (rather than "method")
buffer size isue on levelup text fix pluralisation of single-word objects (eg "leaf")
This commit is contained in:
parent
88f66bb4a7
commit
6199c829bb
2
io.c
2
io.c
|
@ -15413,7 +15413,7 @@ void tombstone(lifeform_t *lf) {
|
|||
wattroff(mainwin, A_BOLD);
|
||||
wattron(mainwin, A_BOLD);
|
||||
mvwprintw(mainwin, y, 0, HISCOREFORMAT, "Pos", "Score", "Name", "Job");
|
||||
wprintw(mainwin, "Method of death"); y++;
|
||||
wprintw(mainwin, "Cause of death"); y++;
|
||||
wmove(mainwin, y, 0);
|
||||
wattroff(mainwin, A_BOLD);
|
||||
|
||||
|
|
2
lf.c
2
lf.c
|
@ -5783,7 +5783,7 @@ void enhanceskills(lifeform_t *lf) {
|
|||
|
||||
for (i = 0; i < nposs; i++) {
|
||||
char this[2];
|
||||
snprintf(this, 1, "%c", getattrletter(poss[i]));
|
||||
snprintf(this, 2, "%c", getattrletter(poss[i]));
|
||||
if (isalpha(this[0])) {
|
||||
if (i == 0) {
|
||||
snprintf(ques, BUFLEN, "Increase your %s", getattrname(poss[i]));
|
||||
|
|
8
text.c
8
text.c
|
@ -2373,7 +2373,9 @@ char *makeplural(char **text) {
|
|||
len = strlen(*text);
|
||||
assert(len > 0);
|
||||
|
||||
newtext = strdup(*text); // make copy
|
||||
//newtext = strdup(*text); // make copy
|
||||
// make copy with trailing space
|
||||
asprintf(&newtext, "%s ", *text);
|
||||
|
||||
for (pl = firstplural ; pl ; pl = pl->next) {
|
||||
strrep(&newtext, pl->singular, pl->plural, &rv);
|
||||
|
@ -2382,6 +2384,10 @@ char *makeplural(char **text) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
// now remove trailing space
|
||||
if ( newtext[strlen(newtext)-1] == ' ') {
|
||||
newtext[strlen(newtext)-1] = '\0';
|
||||
}
|
||||
|
||||
if (!done) {
|
||||
// default
|
||||
|
|
Loading…
Reference in New Issue