[comp.sys.amiga.programmer] stcgfp

koshy@abekrd.co.uk (Koshy Abraham) (03/12/91)

I came across some code that uses these routines, but, unfortunately
Aztec 'C' 5.0d don't have these in it's library. I had a look at my
old Amiga 'C' manual and this didn't have it either so I would assume
these are new additions to SAS Lattice 'C'.

Can some kind soul send me any public domain copies of these routines
or explain what they do.


Thanks.

Koshy.
-- 
Koshy Abraham                UUCP: ...!uunet!mcsun!ukc!pyrltd!abekrd!koshy
Abekas Video Systems Ltd.     NET: koshy@abekrd.co.uk       //
12 Portman Rd,   Reading,   PHONE: +44 734 585421          //                   
Berkshire.       RG3 1EA.     FAX: +44 734 597267      \\ //
United Kingdom.             TELEX: 847579              K\A/b

markv@kuhub.cc.ukans.edu (03/13/91)

In article <1991Mar12.121711.6840@abekrd.co.uk>, koshy@abekrd.co.uk (Koshy Abraham) writes:
> I came across some code that uses these routines, but, unfortunately
> Aztec 'C' 5.0d don't have these in it's library. I had a look at my
> old Amiga 'C' manual and this didn't have it either so I would assume
> these are new additions to SAS Lattice 'C'.
> 
> Can some kind soul send me any public domain copies of these routines
> or explain what they do.

First, you should not leave important info only in the header line,
since not all mailers and mail editors provide the subject line.

Both these functions are for manipulating filenames.  The stcgfn()
gives the "node" part of the file name, the stcgfp() gives the path
part.  Ie:

	full name	DH0:foo/foo2/foo.ext

	Path=DH0:foo/foo2
	Node=foo.ext

SAS/Lattice have several functions for building up and picking apart
filenames and wildcards that are very useful.
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\    Good Cheer !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  mgooderum	      \\\  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: markv@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lewism@lewism.UUCP (Mike Lewis) (03/13/91)

>In article <29033.27dcc2d9@kuhub.cc.ukans.edu> markv@kuhub.cc.ukans.edu writes:
>In article <1991Mar12.121711.6840@abekrd.co.uk>, koshy@abekrd.co.uk (Koshy Abraham) writes:
>> I came across some code that uses these routines, but, unfortunately
>> Aztec 'C' 5.0d don't have these in it's library. I had a look at my
>> old Amiga 'C' manual and this didn't have it either so I would assume
>> these are new additions to SAS Lattice 'C'.
>> 
>> Can some kind soul send me any public domain copies of these routines
>> or explain what they do.
 
These have been in Lattice for quite a while now.

#include <string.h>

size = stcgfe(ext,name) ;
size = stcgfn(node,name) ;
size = stcgfp(path,name);

int size;  size of result string
char *ext; extension pointer area
char *node; node area pointer
char *path; path area pointer
char *name; file name pointer

These functions isolate the path, node or extension parts of a filename

Name                Path       Node     extension
----                ----       ----     ---------
"/abc.dir/def.c"   "abc.dir"   "def"    "c"
 
Its on page L192 in my Lattice manual. I never used any of them!!

+-------------------------------------------------------------------+
| Mike Lewis.    cbmuk!cbmuka!lewism!lewism                         |
| 40 Heyes Lane, Alderley Edge, Cheshire SK9 7JY, (UK) 0625 582762  |
+-------------------------------------------------------------------+