diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/info.c | 11 | ||||
-rw-r--r-- | gst/info.h | 2 |
2 files changed, 13 insertions, 0 deletions
@@ -941,3 +941,14 @@ int info_army_get_list (char l[][32]) { } return len; } + +void info_army_rename (char oldn[], char newn[]) { + char pathnameold[64]; sprintf(pathnameold, "army/%s.txt", oldn); + char pathnamenew[64]; sprintf(pathnamenew, "army/%s.txt", newn); + rename(pathnameold, pathnamenew); +} + +void info_army_remove (char name[]) { + char pathname[64]; sprintf(pathname, "army/%s.txt", name); + remove(pathname); +} @@ -128,6 +128,8 @@ void info_load_army(struct army_ *ar, char *filename); void info_save_army(struct army_ *ar, char *filename); int info_army_get_list(char l[][32]); +void info_army_rename (char oldn[], char newn[]); +void info_army_remove (char name[]); void info_load_playername(char n[]); void info_save_playername(char n[]); |