Skip to content

Commit

Permalink
some bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
apr2504 committed Jul 21, 2021
1 parent 56618ea commit 0aa2d40
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

20 changes: 10 additions & 10 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
);

#ifdef WITH_GDAL
#define USAGE printf("Usage: %s -itrehV [-d directory] [-n number] [-v value] jnxfilename\n\
#define USAGE printf(\
"Usage: %s -itrehV [-d directory] [-n number] [-v value] jnxfilename\n\
-i print info\n\
-t print tiles table\n\
-r print raw values\n\
Expand All @@ -65,7 +66,8 @@
-h this message and exit\n\
-V print version\n",PROG_NAME);
#else
#define USAGE printf("Usage: %s -itrhV [-n number] [-v value] jnxfilename\n\
#define USAGE printf(\
"Usage: %s -itrhV [-n number] [-v value] jnxfilename\n\
-i print info\n\
-t print tiles table\n\
-r print raw values\n\
Expand Down Expand Up @@ -121,14 +123,12 @@ enum
TILES
};

int work_mode;
uint print_tiles_table, elements_counter, print_raw_values, new_value_number;
char tiles_dir[1024];
struct element *elements;
struct level *levels;

extern char *jnx_file_name;
extern char *new_value;
extern int work_mode;
extern uint print_tiles_table, elements_counter, print_raw_values, new_value_number;
extern char tiles_dir[];
extern char *jnx_file_name, *new_value;
extern struct element *elements;
extern struct level *levels;

extern FILE *open_file(char *, char *);
extern char *jnx_grad2grad(char*, int, int);
Expand Down
5 changes: 5 additions & 0 deletions jnx_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ void check_jnx_file()
}
}

uint elements_counter;
struct element *elements;

void read_jnx_file()
{
uint i;
Expand Down Expand Up @@ -101,6 +104,8 @@ void read_jnx_file()
}
}

struct level *levels;

void read_tiles_table()
{
uint i, j;
Expand Down
5 changes: 4 additions & 1 deletion jnxutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
*******************************************************************************/
#include "common.h"

int work_mode;
uint print_tiles_table, print_raw_values, new_value_number;
char tiles_dir[1024];
char *jnx_file_name;
char *new_value = "";

Expand Down Expand Up @@ -86,7 +89,7 @@ void make_config(int argc, char **argv)
break;

case 'd':
ZERO_CHAR_L(tiles_dir, 512);
ZERO_CHAR_L(tiles_dir, 1024);
strcpy(tiles_dir, optarg);
break;
#endif
Expand Down

0 comments on commit 0aa2d40

Please sign in to comment.