On Fri, 25 Jun 2004, Eduardo Casino wrote:
Trivial patch. Pass correct values for codepage and country from DOS-38 and DOS-65-XX functions to MUX-14 functions.
I would actually suggest the following function, as searchPackage is to resolve the default values as well; otherwise your patch breaks the possibility of non-direct (MUX-only) country data, which in turn breaks the whole current NLS design, which would make it better to replace all the code. Latter would be better, I guess, anyway.
COUNT DosGetData(int subfct, UWORD cp, UWORD cntry, UWORD bufsize,
VOID FAR * buf)
{
struct nlsPackage FAR *nls; /* NLS package to use to return the info from */
log(("NLS: GetData(): subfct=%x, cp=%u, cntry=%u, bufsize=%u\n", subfct, cp, cntry, bufsize));
if (!buf || !bufsize) return DE_INVLDDATA; if (subfct == 0) /* Currently not supported */ return DE_INVLDFUNC;
/* nls := NLS package of cntry/codepage */ if ((nls = searchPackage(cp, cntry)) != NULL) { /* matching NLS package found */ if((nls->flags & NLS_FLAG_DIRECT_GETDATA) != 0) /* Direct access to the data */ return nlsGetData(nls, subfct, buf, bufsize); cp = nls->cp; cntry = nls->cntry; } /* If the NLS pkg is not loaded into memory or the direct-access flag is disabled, the request must be passed through MUX */ return (subfct == NLS_DOS_38) ? mux38(cp, cntry, bufsize, buf) : mux65(subfct, cp, cntry, bufsize, buf); }
--
Steffen Kaiser
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel