[AQT-commit] CVS: adapters/pgplot aqdriv.m,1.30,1.31
Brought to you by:
persquare
From: Per P. <per...@us...> - 2003-12-29 22:12:24
|
Update of /cvsroot/aquaterm/adapters/pgplot In directory sc8-pr-cvs1:/tmp/cvs-serv24442 Modified Files: aqdriv.m Log Message: Update to 1.0.a1. Index: aqdriv.m =================================================================== RCS file: /cvsroot/aquaterm/adapters/pgplot/aqdriv.m,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- aqdriv.m 18 Nov 2003 22:37:38 -0000 1.30 +++ aqdriv.m 29 Dec 2003 22:12:21 -0000 1.31 @@ -1,5 +1,5 @@ #import <Foundation/Foundation.h> -#import "AQTAdapter.h" +#import "aquaterm/AQTAdapter.h" /* Debugging extras */ static inline void NOOP_(id x, ...) {;} @@ -28,21 +28,12 @@ #define AQDRIV aqdriv #endif -// Testing the use of a callback function to handle errors in the server -void errorHandler(NSString *msg) -{ - NSLog(msg); - [adapter autorelease]; // add adapter to the AutoReleasePool - adapter = nil; -} - void initAdapter(void) { // Either first time or an error has occurred [arpool release]; // clean arpool = [[NSAutoreleasePool alloc] init]; adapter = [[AQTAdapter alloc] init]; - [adapter setErrorHandler:errorHandler]; } static int currentDevice = 0; @@ -280,6 +271,12 @@ pos = NSPointFromString([eventData objectAtIndex:1]); key = [[eventData objectAtIndex:2] lossyCString][0]; break; + case 42: // Error >= 42 + case 43: // + // NSLog([eventData objectAtIndex:1]); + pos = NSZeroPoint; + key = '\0'; + break; default: NSLog(@"Unknown event, discarding."); break; @@ -320,7 +317,7 @@ } else { - [adapter addEdgeToPoint:NSMakePoint(rbuf[0], rbuf[1])]; + [adapter addEdgeToVertexPoint:NSMakePoint(rbuf[0], rbuf[1])]; } vCount++; if (vCount == vMax) |