Re: Ghostscript/GhostPDL 9.28 Release Candidate 1

Chris Liddell <[email protected]> Thu, 22 Aug 2019 10:04:04 +0100
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <[email protected]>
On 22/08/2019 09:46, Akira Kakuto wrote:
>> gswin32 article9.ps
>> fails with
>> Last OS error: Permission denied.
>> But this seems natural because
>> C:/Windows/Fonts/msgothic.ttc
>> may not be included in allowd paths.
> 
> gswin32 article9.ps
> became OK by changing paths to lower case, because
> Windows OS is not case sensitive:
> 
> #if !defined(_WIN32)
>        const char *a = path;
>        const char *b = control->paths[i];
> #else
>        char *a = path;
>        char *b = control->paths[i];
>        char *p, *q, *r;
>        a = _strlwr(a);
>        b = _strlwr(b);
>        p = (char *)malloc(strlen (b) + 1);
>        strcpy(p, b);
>        q = p;
>        r = b;
>        while(*q) {
>          *r = *q;
>          if ((*q == '\\' || *q == '/') && *q == *(q+1))
>             q++;
>          q++;
>          r++;
>        }
>        *r = '\0';
>        free (p);
> #endif /* _WIN32 */
> 

As I said before, we almost certainly won't be adopting that kind of
solution. As a matter of policy, we avoid platform specific code in
non-platform specific source files.

Chris