summaryrefslogtreecommitdiff
path: root/unsorted/IO.c
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-15 12:14:05 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-15 12:14:05 +0000
commit35d488e972a9dd75ce3867c000405f128b79c615 (patch)
treee3319a23d9aa0d4725f88a99fdd5131488a334a9 /unsorted/IO.c
parent8078e7f897aaae9b492b22475060052d68b9c547 (diff)
downloadMWCC-35d488e972a9dd75ce3867c000405f128b79c615.tar.gz
MWCC-35d488e972a9dd75ce3867c000405f128b79c615.zip
reorganise things a bit to align further with the actual names/structure
Diffstat (limited to 'unsorted/IO.c')
-rw-r--r--unsorted/IO.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/unsorted/IO.c b/unsorted/IO.c
deleted file mode 100644
index 36d809b..0000000
--- a/unsorted/IO.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "parser.h"
-
-void ShowTextHandle(const char *description, Handle text) {
- CWMemHandle mh;
-
- if (!text)
- return;
-
- if (description)
- CLPStatus(71, description);
- CWSecretAttachHandle(parseopts.context, text, &mh);
- CWParserDisplayTextHandle(parseopts.context, description, mh);
-}
-
-void ShowVersion(Boolean decorate) {
- char *vplugin;
- char *valtplugin;
- const char *bdate;
- const char *btime;
- Handle txt;
- int x;
-
- vplugin = 0;
- valtplugin = 0;
- if (parseopts.printedVersion)
- return;
-
- txt = NewHandle(0);
- if (!txt) {
- fprintf(stderr, "\n*** Out of memory\n");
- exit(-23);
- }
-
- for (x = 0; x < parseopts.numPlugins; x++) {
- if (parseopts.plugins[x].plugintype == CWDROPINDRIVERTYPE) continue;
- if (parseopts.plugins[x].plugintype == CWDROPINPARSERTYPE) continue;
-
- if (pTool->TYPE == parseopts.plugins[x].plugintype) {
- if (!vplugin && pTool->LANG == parseopts.plugins[x].language)
- vplugin = parseopts.plugins[x].version;
- else
- valtplugin = parseopts.plugins[x].version;
- }
- }
-
- CWParserGetBuildDate(parseopts.context, &bdate, &btime);
- HPrintF(txt, "\n");
- if (parseopts.toolVersion) {
- HPrintF(
- txt,
- "%s.\n%s, %s\nAll rights reserved.\n%s\n",
- pTool->toolInfo,
- parseopts.toolVersion->copyright,
- parseopts.toolVersion->company,
- parseopts.toolVersion->version
- );
- } else {
- HPrintF(
- txt,
- "%s.\nCopyright (c)%s Metrowerks, Inc.\nAll rights reserved.\n%s\n",
- pTool->toolInfo,
- pTool->copyright,
- vplugin ? vplugin : valtplugin ? valtplugin : ""
- );
- }
-
- HPrintF(txt, "Runtime Built: %s %s\n", bdate, btime);
- HPrintF(txt, "\n");
-
- if (decorate) {
- HPrintF(
- txt,
- "Please enter '%s %chelp' for information about options.\n\n",
- OS_GetFileNamePtr(parseopts.args->argv[0]),
- MAINOPTCHAR[0]
- );
- }
-
- ShowTextHandle(0, txt);
- DisposeHandle(txt);
-
- parseopts.printedVersion = 1;
-}