• src/sbbs3/js_file.c js_gl

    From rswindell@VERT to CVS commit on Sunday, January 20, 2019 05:25:00
    src/sbbs3 js_file.c 1.176 1.177 js_global.c 1.376 1.377 jsexec.c 1.202 1.203 sbbs.h 1.499 1.500
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17125

    Modified Files:
    js_file.c js_global.c jsexec.c sbbs.h
    Log Message:
    The "stdio" File objects (stdin, stdout, stderr) did not work on Windows, because the stdout FILE* is a different address in jsexec than it is in sbbs.dll
    (where the actual File I/O operations occurred). Refactored by passing the stdio file descriptor (and open mode) to js_CreateFileObject rather than the FILE* and using fdopen() to get a FILE* associated with the descriptor. stdout.write() now works, for example.


    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net