Diff for /np2/x11/commng.c between versions 1.4 and 1.8

version 1.4, 2004/01/13 16:28:18 version 1.8, 2012/01/23 04:23:29
Line 11  static UINT Line 11  static UINT
 ncread(COMMNG self, BYTE *data)  ncread(COMMNG self, BYTE *data)
 {  {
   
         UNUSED(self);  
         UNUSED(data);  
   
         return 0;          return 0;
 }  }
   
Line 21  static UINT Line 18  static UINT
 ncwrite(COMMNG self, BYTE data)  ncwrite(COMMNG self, BYTE data)
 {  {
   
         UNUSED(self);  
         UNUSED(data);  
   
         return 0;          return 0;
 }  }
   
Line 31  static BYTE Line 25  static BYTE
 ncgetstat(COMMNG self)  ncgetstat(COMMNG self)
 {  {
   
         UNUSED(self);  
   
         return 0xf0;          return 0xf0;
 }  }
   
Line 40  static long Line 32  static long
 ncmsg(COMMNG self, UINT msg, long param)  ncmsg(COMMNG self, UINT msg, long param)
 {  {
   
         UNUSED(self);  
         UNUSED(msg);  
         UNUSED(param);  
   
         return 0;          return 0;
 }  }
   
Line 51  static void Line 39  static void
 ncrelease(COMMNG self)  ncrelease(COMMNG self)
 {  {
   
         UNUSED(self);          /* Nothing to do */
 }  }
   
 static const _COMMNG com_nc = {  static _COMMNG com_nc = {
         COMCONNECT_OFF, ncread, ncwrite, ncgetstat, ncmsg, ncrelease          COMCONNECT_OFF, ncread, ncwrite, ncgetstat, ncmsg, ncrelease
 };  };
   
Line 77  commng_create(UINT device) Line 65  commng_create(UINT device)
         ret = NULL;          ret = NULL;
   
         switch (device) {          switch (device) {
           case COMCREATE_SERIAL:
                   cfg = &np2oscfg.com[0];
                   break;
   
           case COMCREATE_PC9861K1:
                   cfg = &np2oscfg.com[1];
                   break;
   
           case COMCREATE_PC9861K2:
                   cfg = &np2oscfg.com[2];
                   break;
   
         case COMCREATE_MPU98II:          case COMCREATE_MPU98II:
                 cfg = &np2oscfg.mpu;                  cfg = &np2oscfg.mpu;
                 break;                  break;
Line 93  commng_create(UINT device) Line 93  commng_create(UINT device)
                 break;                  break;
         }          }
         if (cfg) {          if (cfg) {
                 if (cfg->port == COMPORT_MIDI) {                  if ((cfg->port >= COMPORT_COM1)
                    && (cfg->port <= COMPORT_COM4)) {
                           ret = cmserial_create(cfg->port - COMPORT_COM1 + 1, cfg->param, cfg->speed);
                   } else if (cfg->port == COMPORT_MIDI) {
                         ret = cmmidi_create(cfg->mout, cfg->min, cfg->mdl);                          ret = cmmidi_create(cfg->mout, cfg->min, cfg->mdl);
                         if (ret) {                          if (ret) {
                                 (*ret->msg)(ret, COMMSG_MIMPIDEFFILE, (long)cfg->def);                                  (*ret->msg)(ret, COMMSG_MIMPIDEFFILE, (long)cfg->def);

Removed from v.1.4  
changed lines
  Added in v.1.8


RetroPC.NET-CVS <cvs@retropc.net>