"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "base/gslibctx.c" between
ghostscript-9.28rc1.tar.xz and ghostscript-9.28rc2.tar.xz

About: Ghostscript is an interpreter and rendering engine for the PostScript language and for PDF (GPL release). Release candidate.

gslibctx.c  (ghostscript-9.28rc1.tar.xz):gslibctx.c  (ghostscript-9.28rc2.tar.xz)
skipping to change at line 901 skipping to change at line 901
case '+': /* We can let -+ through unchanged */ case '+': /* We can let -+ through unchanged */
case '_': /* We can let -_ through unchanged */ case '_': /* We can let -_ through unchanged */
case 'u': /* We can let -u through unchanged */ case 'u': /* We can let -u through unchanged */
case 'q': /* We can let -q through unchanged */ case 'q': /* We can let -q through unchanged */
break; break;
case 'I': /* Let through the I, but hide anything else */ case 'I': /* Let through the I, but hide anything else */
case 'f': /* Let through the I, but hide anything else */ case 'f': /* Let through the I, but hide anything else */
if (arg[2] == 0) if (arg[2] == 0)
break; break;
p = arg+2; p = arg+2;
while (p == 32) while (*p == 32)
p++; p++;
elide = 1; elide = 1;
break; break;
case 's': case 's':
case 'S': case 'S':
/* By default, we want to keep the key, but lose the value */ /* By default, we want to keep the key, but lose the value */
p = arg+2; p = arg+2;
while (*p && *p != '=') while (*p && *p != '=')
p++; p++;
if (*p == '=') if (*p == '=')
p++; p++;
if (*p == 0) if (*p == 0)
break; /* No value to elide */ break; /* No value to elide */
/* Check for our whitelisted values here */ /* Check for our whitelisted values here */
if (!memcmp("DEFAULTPAPERSIZE", arg+2, p-arg-3)) #define ARG_MATCHES(STR, ARG, LEN) \
(strlen(STR) == LEN && !memcmp(STR, ARG, LEN))
if (ARG_MATCHES("DEFAULTPAPERSIZE", arg+2, p-arg-3))
break; break;
if (!memcmp("DEVICE", arg+2, p-arg-3)) if (ARG_MATCHES("DEVICE", arg+2, p-arg-3))
break; break;
if (!memcmp("PAPERSIZE", arg+2, p-arg-3)) if (ARG_MATCHES("PAPERSIZE", arg+2, p-arg-3))
break; break;
if (!memcmp("SUBSTFONT", arg+2, p-arg-3)) if (ARG_MATCHES("SUBSTFONT", arg+2, p-arg-3))
break; break;
if (!memcmp("ColorConversionStrategy", arg+2, p-arg-3)) if (ARG_MATCHES("ColorConversionStrategy", arg+2, p-arg-3))
break; break;
if (!memcmp("PageList", arg+2, p-arg-3)) if (ARG_MATCHES("PageList", arg+2, p-arg-3))
break; break;
if (!memcmp("ProcessColorModel", arg+2, p-arg-3)) if (ARG_MATCHES("ProcessColorModel", arg+2, p-arg-3))
break; break;
#undef ARG_MATCHES
/* Didn't match a whitelisted value, so elide it. */ /* Didn't match a whitelisted value, so elide it. */
elide = 1; elide = 1;
break; break;
default: default:
/* Shouldn't happen, but elide it just in case */ /* Shouldn't happen, but elide it just in case */
arg = "?"; arg = "?";
break; break;
} }
break; break;
case '@': case '@':
skipping to change at line 1045 skipping to change at line 1048
if (word) if (word)
strcpy(core->argv[core->argc], "path/"); strcpy(core->argv[core->argc], "path/");
else else
core->argv[core->argc][0] = 0; core->argv[core->argc][0] = 0;
strcat(core->argv[core->argc], word ? word : arg); strcat(core->argv[core->argc], word ? word : arg);
core->argc++; core->argc++;
return 0; return 0;
} }
int gs_lib_ctx_get_args(gs_lib_ctx_t *ctx, const char ***argv) int gs_lib_ctx_get_args(gs_lib_ctx_t *ctx, const char * const **argv)
{ {
gs_lib_ctx_core_t *core; gs_lib_ctx_core_t *core;
if (ctx == NULL || ctx->core == NULL || argv == NULL) if (ctx == NULL || ctx->core == NULL || argv == NULL)
return 0; return 0;
core = ctx->core; core = ctx->core;
*argv = core->argv; *argv = core->argv;
return core->argc; return core->argc;
} }
 End of changes. 10 change blocks. 
9 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)