With all this morning's correspondence in mind, here's a patch that I think fixes and clarifies things. The Application Developer's Guide should be changed to note the change in argument name (from maxlen to capacity). The AppDevGuide comment before macExpandString should be modified to add the note that the return value count does not include any trailing null.
I think that all calls to macExpandString from base are now consistent.
The msi extension needs the patch:
--- msi.c.orig 2010-03-31 10:31:04.000000000 -0700
+++ msi.c 2010-03-31 10:31:07.000000000 -0700
@@ -227,7 +227,7 @@
}
endif:
if (expand) {
- n = macExpandString(macPvt,input,buffer,MAX_BUFFER_SIZE-1);
+ n = macExpandString(macPvt,input,buffer,MAX_BUFFER_SIZE);
fputs(buffer,stdout);
if (!unexpWarned && n<0) {
fprintf(stderr,"Warning: unexpanded macros in ouput\n");
With all this morning's correspondence in mind, here's a patch that I think fixes and clarifies things. The Application Developer's Guide should be changed to note the change in argument name (from maxlen to capacity). The AppDevGuide comment before macExpandString should be modified to add the note that the return value count does not include any trailing null.
I think that all calls to macExpandString from base are now consistent. (macPvt, input,buffer, MAX_BUFFER_ SIZE-1) ; (macPvt, input,buffer, MAX_BUFFER_ SIZE); buffer, stdout) ; stderr, "Warning: unexpanded macros in ouput\n");
The msi extension needs the patch:
--- msi.c.orig 2010-03-31 10:31:04.000000000 -0700
+++ msi.c 2010-03-31 10:31:07.000000000 -0700
@@ -227,7 +227,7 @@
}
endif:
if (expand) {
- n = macExpandString
+ n = macExpandString
fputs(
if (!unexpWarned && n<0) {
fprintf(