mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-25 23:49:25 +00:00
Used #ifdef to make sure GNU-C-specific stuff only is used with GCC (so now it compiles with VS).
No change in functionality. git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@64 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
8d2719db8a
commit
ba348db03e
@ -17,7 +17,7 @@
|
||||
|
||||
#define RELEASE "0.95.6" // update before release (FIXME)
|
||||
#define CODENAME "Fenchurch" // update before release
|
||||
#define CHANGE_DATE "15 Jun" // update before release
|
||||
#define CHANGE_DATE "20 Jun" // update before release
|
||||
#define CHANGE_YEAR "2015" // update before release
|
||||
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/" // FIXME
|
||||
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME
|
||||
|
@ -221,6 +221,7 @@ static void parse_forward_anon_def(int *statement_flags)
|
||||
}
|
||||
symbol_fix_forward_anon_name(TRUE); // TRUE: increment counter
|
||||
DynaBuf_append(GlobalDynaBuf, '\0');
|
||||
//printf("[%d, %s]\n", Section_now->zone, GlobalDynaBuf->buffer);
|
||||
symbol_set_label(Section_now->zone, *statement_flags, 0, FALSE);
|
||||
}
|
||||
|
||||
|
@ -641,7 +641,11 @@ static enum eos po_source(void) // now GotByte = illegal char
|
||||
|
||||
// if file could be opened, parse it. otherwise, complain
|
||||
if ((fd = fopen(GLOBALDYNABUF_CURRENT, FILE_READBINARY))) {
|
||||
char filename[GlobalDynaBuf->size];
|
||||
#ifdef __GNUC__
|
||||
char filename[GlobalDynaBuf->size]; // GCC can do this
|
||||
#else
|
||||
char *filename = safe_malloc(GlobalDynaBuf->size); // VS can not
|
||||
#endif
|
||||
|
||||
strcpy(filename, GLOBALDYNABUF_CURRENT);
|
||||
outer_input = Input_now; // remember old input
|
||||
@ -650,6 +654,9 @@ static enum eos po_source(void) // now GotByte = illegal char
|
||||
flow_parse_and_close_file(fd, filename);
|
||||
Input_now = outer_input; // restore previous input
|
||||
GotByte = local_gotbyte; // CAUTION - ugly kluge
|
||||
#ifndef __GNUC__
|
||||
free(filename); // GCC auto-frees
|
||||
#endif
|
||||
} else {
|
||||
Throw_error(exception_cannot_open_input_file);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ void Section_new_zone(struct section *section, const char *type, char *title, in
|
||||
section->allocated = allocated;
|
||||
// activate new section
|
||||
Section_now = section;
|
||||
//printf("[new zone %d: %s, %s]\n", section->zone, section->type, section->title);
|
||||
}
|
||||
|
||||
// Tidy up: If necessary, release section title.
|
||||
|
Loading…
Reference in New Issue
Block a user