--- np2/win9xc/commng.cpp 2003/10/16 17:59:19 1.1 +++ np2/win9xc/commng.cpp 2003/12/27 02:29:44 1.4 @@ -1,31 +1,33 @@ #include "compiler.h" +#include "np2.h" #include "commng.h" -#include "cmmidi.h" +#include "cmver.h" +#include "cmjasts.h" // ---- non connect -UINT commng_ncread(COMMNG self, BYTE *data) { +static UINT ncread(COMMNG self, BYTE *data) { (void)self; (void)data; return(0); } -UINT commng_ncwrite(COMMNG self, BYTE data) { +static UINT ncwrite(COMMNG self, BYTE data) { (void)self; (void)data; return(0); } -BYTE commng_ncgetstat(COMMNG self) { +static BYTE ncgetstat(COMMNG self) { (void)self; return(0xf0); } -UINT commng_ncmsg(COMMNG self, UINT msg, long param) { +static long ncmsg(COMMNG self, UINT msg, long param) { (void)self; (void)msg; @@ -37,14 +39,14 @@ static void ncrelease(COMMNG self) { } static const _COMMNG com_nc = { - COMCONNECT_OFF, - commng_ncread, commng_ncwrite, commng_ncgetstat, commng_ncmsg, - ncrelease}; + COMCONNECT_OFF, ncread, ncwrite, ncgetstat, ncmsg, ncrelease}; // ---- void commng_initialize(void) { + + cmvermouth_initialize(); } COMMNG commng_create(UINT device) { @@ -53,7 +55,12 @@ COMMNG commng_create(UINT device) { ret = NULL; if (device == COMCREATE_MPU98II) { - ret = cmmidi_create(); + ret = cmvermouth_create(); + } + else if (device == COMCREATE_PRINTER) { + if (np2oscfg.jastsnd) { + ret = cmjasts_create(); + } } if (ret == NULL) { ret = (COMMNG)&com_nc;