ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/serial.cpp
(Generate patch)

Comparing SheepShaver/src/serial.cpp (file contents):
Revision 1.1.1.1 by cebix, 2002-02-04T16:58:13Z vs.
Revision 1.3 by cebix, 2004-01-12T15:37:19Z

# Line 1 | Line 1
1   /*
2   *  serial.cpp - Serial device driver
3   *
4 < *  SheepShaver (C) 1997-2002 Marc Hellwig and Christian Bauer
4 > *  SheepShaver (C) 1997-2004 Marc Hellwig and Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 32 | Line 32
32   SERDPort *the_serd_port[2];
33  
34   // Function pointers from imported functions
35 < typedef int16 (*iocommandiscomplete_ptr)(uint32, int16);
36 < static iocommandiscomplete_ptr IOCommandIsComplete;
35 > typedef int16 (*iocic_ptr)(uint32, int16);
36 > static uint32 iocic_tvect = 0;
37 > static inline int16 IOCommandIsComplete(uint32 arg1, int16 arg2)
38 > {
39 >        return (int16)CallMacOS2(iocic_ptr, iocic_tvect, arg1, arg2);
40 > }
41  
42  
43   /*
# Line 55 | Line 59 | int16 SerialOpen(uint32 pb, uint32 dce)
59          D(bug("SerialOpen pb %08lx, dce %08lx\n", pb, dce));
60  
61          // Get IOCommandIsComplete function
62 <        IOCommandIsComplete = (iocommandiscomplete_ptr)FindLibSymbol("\021DriverServicesLib", "\023IOCommandIsComplete");
63 <        D(bug("IOCommandIsComplete TVECT at %08lx\n", (uint32)IOCommandIsComplete));
64 <        if (IOCommandIsComplete == NULL) {
62 >        iocic_tvect = (uint32)FindLibSymbol("\021DriverServicesLib", "\023IOCommandIsComplete");
63 >        D(bug("IOCommandIsComplete TVECT at %08lx\n", iocic_tvect));
64 >        if (iocic_tvect == 0) {
65                  printf("FATAL: SerialOpen(): Can't find IOCommandIsComplete()\n");
66                  return openErr;
67          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines