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>
* 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
* back.make.in: Idem.
* config.make.in: Idem.

View file

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