summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/files.c143
-rw-r--r--src/main.c9
2 files changed, 0 insertions, 152 deletions
diff --git a/src/files.c b/src/files.c
index 1c4e816f..43ff614e 100644
--- a/src/files.c
+++ b/src/files.c
@@ -4096,149 +4096,6 @@ void html_screenshot(cptr name)
my_fclose(htm);
}
-/*
- * Because this is dead code and hardly anyone but DG needs it.
- * IMHO this should never been included in the game code -- pelpel
- */
-#if !defined(WINDOWS) && !defined(MACINTOSH)
-
-#define KEY_NUM 9
-static int keys_tab[KEY_NUM] =
-{
- 'I', 'G', 'M', 'O', 'P', 'm', 'D', 'B', 'V',
-};
-
-static cptr keys_desc[KEY_NUM] =
-{
- "Interface changes:",
- "Gameplay changes:",
- "Monster changes:",
- "Object changes:",
- "Player changes:",
- "Misc changes:",
- "Dungeon changes:",
- "Bug fixes:",
- "Version:",
-};
-
-static int get_key(char c)
-{
- int i;
-
- i = 0;
- while (keys_tab[i] != c)
- i++;
- return ((i > KEY_NUM) ? KEY_NUM : i);
-}
-
-/*
- * Some ports don't like huge stacks
- */
-typedef char chg_type[500][100];
-
-bool_ chg_to_txt(cptr base, cptr newname)
-{
- int i, j, key = 0;
-
- char buf[1024];
-
- int lens[KEY_NUM] = {0, 0, 0, 0, 0, 0, 0, 0};
- chg_type *strs;
-
- /* Current chg file */
- FILE *fff = NULL;
-
- /* Current txt file */
- FILE *txt = NULL;
-
- /* Open the file */
- fff = my_fopen(base, "r");
-
- /* Oops */
- if (!fff)
- {
- my_fclose(fff);
- my_fclose(txt);
-
- /* Oops */
- return (TRUE);
- }
-
- /* Count the file */
- while (TRUE)
- {
- /* Skip a line */
- if (my_fgets(fff, buf, 1024)) break;
-
- if ((!(*buf)) ||
- ((buf[0] >= '0') && (buf[0] <= '9')) || (buf[0] == '#')) continue;
-
- if (buf[1] != ' ')
- lens[get_key(buf[1])]++;
- }
-
- /* Open the file */
- txt = my_fopen(newname, "w");
-
- /* Open the file */
- fff = my_fopen(base, "r");
-
- /* Oops */
- if (!fff || !txt)
- {
- my_fclose(fff);
- my_fclose(txt);
-
- /* Oops */
- return (TRUE);
- }
-
- for (i = 0; i < KEY_NUM; i++) lens[i] = 0;
-
- /* Allocate big amount of temporary storage */
- C_MAKE(strs, KEY_NUM, chg_type);
-
- /* Display the file */
- while (TRUE)
- {
- /* Skip a line */
- if (my_fgets(fff, buf, 1024)) break;
-
- if ((!(*buf)) ||
- ((buf[0] >= '0') && (buf[0] <= '9')) || (buf[0] == '#')) continue;
-
- if (buf[1] != ' ') key = get_key(buf[1]);
-
- if (key == KEY_NUM - 1)
- strcpy(strs[key][lens[key]++], buf + 5);
- else
- strcpy(strs[key][lens[key]++], buf + 3);
- }
-
- fprintf(txt, "%s changes\n", strs[KEY_NUM - 1][0]);
-
- for (i = 0; i < KEY_NUM - 1; i++)
- {
- if (lens[i]) fprintf(txt, "\n%s\n", keys_desc[i]);
-
- for (j = 0; j < lens[i]; j++)
- {
- fprintf(txt, "%s\n", strs[i][j]);
- }
- }
-
- /* Close the file */
- my_fclose(txt);
- my_fclose(fff);
-
- /* Free temporary memory */
- C_FREE(strs, KEY_NUM, chg_type);
-
- /* Normal return */
- return (TRUE);
-}
-
-#endif /* !WINDOWS && !MACINTOSH */
/*
* Peruse the On-Line-Help
diff --git a/src/main.c b/src/main.c
index af5d2fc4..82b8d6e0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -510,14 +510,6 @@ int main(int argc, char *argv[])
return 0;
}
- case 'c':
- case 'C':
- {
- chg_to_txt(argv[i + 1], argv[i + 2]);
-
- return 0;
- }
-
case 'd':
case 'D':
{
@@ -557,7 +549,6 @@ usage:
puts(" -o Request original keyset");
puts(" -r Request rogue-like keyset");
puts(" -H <list of files> Convert helpfile to html");
- puts(" -c f1 f2 Convert changelog f1 to nice txt f2");
puts(" -s<num> Show <num> high scores");
puts(" -u<who> Use your <who> savefile");
puts(" -M<which> Use the <which> module");