From af95c0dfb1979946796ae9573f6bfb324543c961 Mon Sep 17 00:00:00 2001 From: Wayne Cripps Date: Mon, 28 Mar 2022 14:12:25 -0400 Subject: [PATCH] Made changes to input and output file name length - from 120 to BIFSIZ which is 2048 --- CHANGELOG | 4 +++- buffer.cc | 2 +- file_in.cc | 4 ++-- i_buf.cc | 2 +- main.cc | 2 +- ps_print.h | 2 +- tab.h | 2 +- version.h | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 45a2754..be20a6c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ +VERSION "4.3.104" +change file name length to be greater than 120 chars + VERSION "4.3.103" make gray barline that don't count in bar numbering -add github token VERSION "4.3.102" fixes to make measure numbers print when used with double bar lines diff --git a/buffer.cc b/buffer.cc index 0b680c7..97a9336 100644 --- a/buffer.cc +++ b/buffer.cc @@ -154,7 +154,7 @@ void buffer::dump(const char *fname, const mode mode) // dump to a file if (strcmp(fname, "stdout")) { fp = fopen(fname, "wb"); if (fp == NULL) { - dbg1(Error, "tab: dump: can't open %s for output\n", (void *)fname); + dbg1(Error, "tab: buffer: dump: can't open %s for output\n", (void *)fname); } fwrite(bytes, num_bytes, 1, fp); fclose(fp); diff --git a/file_in.cc b/file_in.cc index a26b461..772462d 100644 --- a/file_in.cc +++ b/file_in.cc @@ -32,7 +32,7 @@ void c2p(const char * name, Str255 fname); file_in::file_in(const char * fname, const char *mode) { dbg1(Proceedure, "starting file_in %s\n", (void *)fname); - fn = (char *)malloc(120); + fn = (char *)malloc(1024); strcpy (fn, fname); _file_in(fname, mode); } @@ -117,7 +117,7 @@ file_in::~file_in() file_in::file_in() { - char fname[120]; + char fname[1024]; #ifdef MAC OSErr error; short refNum; diff --git a/i_buf.cc b/i_buf.cc index b3d4534..75a570b 100644 --- a/i_buf.cc +++ b/i_buf.cc @@ -262,7 +262,7 @@ void i_buf::dump(const char *fname, const mode mode) // dump to a file } if (fp == NULL) { - dbg1(Error, "tab: dump: can't open %s for output\n", (void *)fname); + dbg1(Error, "tab: i_buf: dump: can't open %s for output\n", (void *)fname); } file_bytes = num_bytes; diff --git a/main.cc b/main.cc index 08a7046..192c235 100644 --- a/main.cc +++ b/main.cc @@ -55,7 +55,7 @@ void init(file_info *f) /* int pagenum = 0; */ bar_count = 0; red = 1.0; - f->file = (char *)malloc( BL ); + f->file = (char *)malloc( BUFSIZ /* BL */ ); /* wbc Mar 28 2022 */ f->file[0] = '\0'; f->out_file = (char *)malloc( BL ); f->out_file[0] = '\0'; diff --git a/ps_print.h b/ps_print.h index 80aeeac..eccdeee 100644 --- a/ps_print.h +++ b/ps_print.h @@ -26,7 +26,7 @@ class ps_print : public print { void make_ps_font(i_buf *ps_header); void init_hv(); int ps_top_of_page; - char f_name[120]; // this should be in ps_print.h + char f_name[BUFSIZ]; // this should be in ps_print.h double font_sizes[FONT_NAMES]; int nodump; unsigned int left_margin; diff --git a/tab.h b/tab.h index ff48a0e..9db9f60 100644 --- a/tab.h +++ b/tab.h @@ -38,7 +38,7 @@ void dbg_set(const dbg_type type); #endif #define STAFF 11 -#define BL 120 /* default file name size */ +#define BL 1024 /* 120 */ /* default file name size */ #define STAFF_PAGE 9 #define MAX_PAGE 25 diff --git a/version.h b/version.h index 70a87b0..bf0a966 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define VERSION "4.3.103" +#define VERSION "4.3.104"