Use new defo of GSDefineGState

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@13327 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-04-02 21:47:44 +00:00
parent 005c69ec5d
commit 8c8b1cfebb
2 changed files with 8 additions and 6 deletions

View file

@ -1,5 +1,9 @@
2002-04-02 Adam Fedor <fedor@gnu.org> 2002-04-02 Adam Fedor <fedor@gnu.org>
* Source/gsc/GSContext.m (-GSDefineGState): Use new def - also
creates a copy of the gstate.
(-GSReplaceGState): Replace with copy of current gstate.
* configure.in (--with-name): Configure the name of the backend * configure.in (--with-name): Configure the name of the backend
* back.make.in: Idem. * back.make.in: Idem.
* config.make.in: Idem. * config.make.in: Idem.

View file

@ -370,6 +370,7 @@ static unsigned int unique_index = 0;
/* Gstate Handling */ /* Gstate Handling */
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* Depreciated. Use GSReplaceGState */
- (void) DPScurrentgstate: (int)gst - (void) DPScurrentgstate: (int)gst
{ {
if (gst) if (gst)
@ -399,6 +400,7 @@ static unsigned int unique_index = 0;
gstate = [gstate copy]; gstate = [gstate copy];
} }
/* Depreciated. Use GSDefineGstate */
- (void) DPSgstate - (void) DPSgstate
{ {
ctxt_push(AUTORELEASE([gstate copy]), opstack); ctxt_push(AUTORELEASE([gstate copy]), opstack);
@ -422,17 +424,14 @@ static unsigned int unique_index = 0;
DESTROY(gstate); DESTROY(gstate);
} }
/* Should work the same as 'unique_index exch defineuserobject' */
- (int) GSDefineGState - (int) GSDefineGState
{ {
GSGState *obj;
if(gstate == nil) if(gstate == nil)
{ {
DPS_ERROR(DPSundefined, @"No gstate"); DPS_ERROR(DPSundefined, @"No gstate");
return 0; return 0;
} }
ctxt_pop(obj, opstack, GSGState); NSMapInsert(gtable, (void *)++unique_index, AUTORELEASE([gstate copy]));
NSMapInsert(gtable, (void *)++unique_index, obj);
return unique_index; return unique_index;
} }
@ -441,12 +440,11 @@ static unsigned int unique_index = 0;
[self DPSundefineuserobject: gst]; [self DPSundefineuserobject: gst];
} }
/* Should work the same as 'currentgstate pop' */
- (void) GSReplaceGState: (int)gst - (void) GSReplaceGState: (int)gst
{ {
if(gst <= 0) if(gst <= 0)
return; return;
NSMapInsert(gtable, (void *)gst, gstate); NSMapInsert(gtable, (void *)gst, AUTORELEASE([gstate copy]));
} }
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */