aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dla2csv.c25
-rw-r--r--dla2csv.xexbin10501 -> 10411 bytes
2 files changed, 14 insertions, 11 deletions
diff --git a/dla2csv.c b/dla2csv.c
index 4e5aa51..a7a4e6e 100644
--- a/dla2csv.c
+++ b/dla2csv.c
@@ -35,7 +35,7 @@ void print_id(void) {
#ifdef __ATARI__
/* Uncomment this to see elapsed time in convert() */
- /* #define PROFILE */
+ // #define PROFILE
/* cc65 doesn't "localize" \b to the Atari backspace character, so: */
#define BS CH_DEL
@@ -106,7 +106,7 @@ void print_id(void) {
}
void print_banner(void) {
- int i;
+ unsigned char i;
print_id();
@@ -132,10 +132,10 @@ void print_id(void) {
drive is an ASCII digit, e.g. 0x31 is drive 1. */
void show_dir(char drive) {
static char dirspec[16];
- char device = 'D';
DIR *dir;
struct dirent *ent;
- int column = 0;
+ char device = 'D';
+ unsigned char column = 0;
if(drive == '0') {
drive++;
@@ -377,8 +377,16 @@ int read_file(void) {
/* convert() returns the number of particles on success, 0 on failure. */
int convert(char *eol) {
- register char *inp;
- int x, y, xmask, particles;
+#ifdef __ATARI__
+ register
+#endif
+ unsigned char x, y;
+#ifdef __ATARI__
+ register
+#endif
+ char *inp = inbuf;
+ unsigned char xmask = 0x80;
+ int particles = 0;
outf = prompt_filename("Output CSV", "wb");
@@ -386,15 +394,10 @@ int convert(char *eol) {
printf("Press Ctrl-C to abort conversion.\n");
#endif
printf("\nConverting... ");
- fflush(stdout);
/* CSV file header row (column names) */
fprintf(outf, "x,y%s", eol);
- inp = inbuf;
- xmask = 0x80;
- particles = 0;
-
#ifdef __ATARI__
#ifdef PROFILE
OS.rtclok[0] = OS.rtclok[1] = OS.rtclok[2] = 0;
diff --git a/dla2csv.xex b/dla2csv.xex
index 77a67c4..c9bd19f 100644
--- a/dla2csv.xex
+++ b/dla2csv.xex
Binary files differ