
FILESCAN                                                        13-NOV-1985 16:17:37    VAX C      V2.1-007                 Page 1
V1.0                                                            13-NOV-1985 16:05:16    [MULTIWARE.DECUSF85.WHO]FILESCAN.C;2 (1)



    1        	/* FILE: filescan.c
    2        	**
    3        	** WRITTEN BY: Adam Bridge
    4        	**
    5        	** MODIFIED BY:
    6        	**
    7        	** EDIT HISTORY:
    8        	**	14-Oct-1985		AB		Initial Creation
    9        	**
   10        	**++
   11        	** NAME
   12        	**	  filescan  -  break apart file name into constituent parts
   13        	**
   14        	** SYNOPSIS
   15        	**	  int filescan( string,  valuelst)
   16        	**		char *string;
   17        	**	    struct item_desciptor   *valuelst;
   18        	**
   19        	** FUNCTION
   20        	**	  filescan uses the $FILESCAN system service to break apart a file
   21        	**	  name into its constituent parts.  The valuelst provided is provided
   22        	**	  by the user and consists of requests to the system for specific
   23        	**        information about the length and starting points of the name items
   24        	**        in the passed file specification.
   25        	**
   26        	** RETURNS
   27        	**        filescan returns the status code for the call to SYS$FILESCAN
   28        	**--
   29        	*/
   30        	 
   31        	#include descrip
  403        	#include "filescan.h"
  432        	 
  433        	int filescan( string, valuelst)
  434        		char *string;
  435        		struct item_descriptor *valuelst;
  436        		{
  437    1   		static struct dsc$descriptor_s fn_desc;
  438    1   	 
  439    1   		fn_desc.dsc$b_dtype = DSC$K_DTYPE_T ;	/* build a descriptor */
  440    1   		fn_desc.dsc$b_class = DSC$K_CLASS_S;
  441    1   		fn_desc.dsc$w_length = strlen(string);
  442    1   		fn_desc.dsc$a_pointer = string;
  443    1   	 
  444    1   		return( SYS$FILESCAN( &fn_desc, valuelst, 0L));
  445    1   		}


FILESCAN                                                        13-NOV-1985 16:17:37    VAX C      V2.1-007                 Page 2
V1.0                                                            13-NOV-1985 16:05:16    [MULTIWARE.DECUSF85.WHO]FILESCAN.C;2 (1)

                                       +-------------+
                                       | Storage Map |
                                       +-------------+
 
 

External Declarations
---------------------

 Identifier Name                 Line    Size            Class        Type
 ---------------                 ----    ----            -----        ----

dsc$descriptor_s                 53      8 bytes                      Structure tag
 dsc$w_length                    55      1 word                        Member (offset = 0), unsigned short int
 dsc$b_dtype                     58      1 byte                        Member (offset = 2 bytes), unsigned char
 dsc$b_class                     59      1 byte                        Member (offset = 3 bytes), unsigned char
 dsc$a_pointer                   60      1 longword                    Member (offset = 4 bytes), pointer to char
item_descriptor                  425     8 bytes                      Structure tag
 comp_length                     427     1 word                        Member (offset = 0), short int
 item_code                       428     1 word                        Member (offset = 2 bytes), short int
 comp_address                    429     1 longword                    Member (offset = 4 bytes), pointer to char
 
 

Function "filescan" defined at line 433
---------------------------------------

 Identifier Name                 Line    Size            Class        Type
 ---------------                 ----    ----            -----        ----

fn_desc                          437     8 bytes         Static       Struct dsc$descriptor_s
string                           434     1 longword                   Parameter # 1, pointer to char
strlen                           441                     Extern       Function returning long int
SYS$FILESCAN                     444                     Extern       Function returning long int
valuelst                         435     1 longword                   Parameter # 2, pointer to struct item_descriptor
 
 

Psect Synopsis
--------------

 Psect Name                     Allocation  Attributes
 ----------                     ----------  ----------

$CODE                           53 bytes    Position-independent, relocatable, shareable, executable, readable
$DATA                           8 bytes     Position-independent, relocatable, readable, writeable
 
 

FILESCAN                                                        13-NOV-1985 16:17:37    VAX C      V2.1-007                 Page 3
V1.0                                                            13-NOV-1985 16:05:16    [MULTIWARE.DECUSF85.WHO]FILESCAN.C;2 (1)


Function Definition Map
-----------------------

 Line   Name
 ----   ----

433     filescan
 
 
Command Line
------------
 
CC/DEBUG=NONE/LIST/SHOW=BRIEF WHO,FILESCAN

