bbfad1e299
This addresses the following issues: *If the low-order 16 bits of n were 0x0000, no concatenation would be performed. *If n was 0x1000000 or greater, the output could be cut off prematurely because the high byte of n was effectively ignored. The following test program demonstrates these issues: #pragma memorymodel 1 #include <stdlib.h> #include <string.h> #include <stdio.h> #define LEN2 100000 int main(void) { char *s1 = malloc(LEN2+2); char *s2 = malloc(LEN2+1); if (!s1 || !s2) return 0; for (unsigned long i = 0; i < LEN2; i++) s2[i] = '0' + (i & 0x07); strcpy(s1,"a"); strncat(s1, s2, 0x1000000); puts(s1); printf("len = %zu\n", strlen(s1)); } |
||
---|---|---|
obj | ||
LICENSE | ||
README.md | ||
assert.asm | ||
assert.macros | ||
backup | ||
cc.asm | ||
cc.macros | ||
ctype.asm | ||
equates.asm | ||
fcntl.asm | ||
fcntl.macros | ||
int64.asm | ||
int64.macros | ||
locale.asm | ||
locale.macros | ||
m16.int64 | ||
make | ||
orca.asm | ||
orca.macros | ||
setjmp.asm | ||
settypes | ||
signal.asm | ||
signal.macros | ||
smac | ||
stdio.asm | ||
stdio.macros | ||
stdlib.asm | ||
stdlib.macros | ||
string.asm | ||
string.macros | ||
time.asm | ||
time.macros | ||
toolglue.asm | ||
toolglue.macros | ||
uchar.asm | ||
uchar.macros | ||
vars.asm | ||
vars.macros |
README.md
ORCALib
Libraries for the ORCA language suite (ORCA/C, ORCA/M, ORCA/Pascal) for the Apple IIGS
If you would like to make changes to this compiler and distribute them to others, feel free to submit them here. If the changes apply to the Apple IIGS, they will generally be approved for distribution on the master branch. For changes that retarget the library to generate code for a different platform, the project will either be forked or a new repository will be created, as appropriate.
The general conditions that must be met before a change is released on master are:
-
The modified library must compile under the currently released version of ORCA/M.
-
The various languages that make use of the library mush still pass their respective test suites, or changes to those test suites must also be submitted.
Contact support@byteworks.us if you need contributor access.
A complete distribution of the ORCA languages, including installers and documentation, is available from the Juiced GS store at https://juiced.gs/store/category/software/. It is distributed as part of the Opus ][ package.