From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 28-APR-1993 12:50:40.95
To:	info-vax@sri.com
CC:	
Subj:	Summary: shell$ routines

Summary of the responses about the shell$ routines, so far:

They seem to be part of the DEC/Shell product, a implementation of
a un*x shell under VMS. The routines seem to be there even if you
haven't installed DEC/Shell, but the same naturally doesn't happen
with the help files.

The file below can be extracted as shell.hlp and put into one's
system libraries.

Thanks for all the answers,

.. Juan
-----------------------------cut---------------------------------
1 SHELL

  The VAXC Shell$ run time library routines.

2 SHELL$CLI_NAME

  Reports your current CLI name.

  General high-level language format:

      status = shell$cli_name( cli_name_desc )

  VAX C format:

      # include descrip

      int shell$cli_name();
      struct dsc$descriptor *cli_name_desc;

  SHELL$CLI_NAME places the string "SHELL" in  the  user-supplied  string
  descriptor,  cli_name_desc,  if  the  current  CLI  is  the  DEC/Shell.
  Otherwise, the string "CLI$NAME" is placed in cli_name_desc.

2 SHELL$FIX_TIME

  Converts VAX/VMS binary system times to UNIX binary times.

  General high-level language format:

      unxtim = shell$fix_time( vmstim )

  VAX C format:

      int quadword[2];
      int *vmstim = quadword;
      int shell$fix_time();

  SHELL$FIX_TIME converts a VMS binary time (a 64 bit quadword containing
  a  number  of  10  nsec.   ticks  since 00:00 November 17, 1858) into a
  UNIX-like time longword containing the number of  seconds  since  00:00
  January  1,  1970.   This  routine is useful in converting binary times
  returned by VMS system services and RMS services into the  format  used
  by some C routines (such as ctime, localtime).

2 SHELL$FROM_VMS

  Converts VAX/VMS file specifications to Shell file specifications.

  General high-level language format:

      num_files_found =
      shell$from_vms( vms_filespec, action_routine, wild_flag )

  VAX C format:

      char *vms_filespec;
      int wild_flag;
      int action_routine();
      int shell$from_vms();

  SHELL$FROM_VMS converts the  given  VMS  file  specification  into  the
  equivalent  DEC/Shell  file specification.  Further, it allows you user
  to specify VMS wildcards and have them translated into a  corresponding
  list of existing files in DEC/Shell file specification syntax.

3 Arguments

  vms_filespec

      The address of a null-terminated string containing a  name  in  VMS
      file specification syntax.

  action_routine

      The address of  a  routine  that  takes  as  its  only  argument  a
      null-terminated  string  containing  the  translation  of the given
      DEC/Shell name syntax to valid VMS filename  syntax.   Further,  if
      this  routine  returns  false  (low  bit  clear),  no  further file
      translation takes place.

  wild_flag

      Either a 0 or 1 passed  by  value.   If  a  0  is  specified,  then
      wildcards found in the shell_filespec are not expanded.  Otherwise,
      such  wildcards  are  expanded  and   each   is   passed   to   the
      action_routine.   Only  those expanded filenames that correspond to
      existing VMS files will be included.

3 Returns

  num_files_found

      The  number  of  filenames  that  result  from  the  given  VAX/VMS
      filespec.

2 SHELL$IS_SHELL

  Determines whether you are running the DEC/Shell as your current CLI.

  General high-level Language Format:

      status = shell$is_shell()

  VAX C format:

      int shell$is_shell();
      status = shell$is_shell()

2 SHELL$MATCH_WILD

  Matches a file specification to a pattern.

  General high-level language format:

      status = shell$match_wild( string, pattern )

  VAX C format:

      char *string;
      char *pattern;
      int shell$match_wild();

2 SHELL$TO_VMS

  Converts DEC/Shell file specifications to VAX/VMS file specifications.

  General high-level language format:

      num_files_found =
      shell$to_vms( shell_filespec, action_routine, wild_flag )

  VAX C format:

      char *shell_filespec;
      int wild_flag;
      int action_routine();
      int shell$to_vms();

  SHELL$TO_VMS converts the given DEC/Shell file specification  into  the
  equivalent  VMS  file specification.  Further, it allows you to specify
  DEC/Shell wildcard characters and have them translated into a  list  of
  the corresponding existing VMS files.

3 Arguments

  shell_filespec

      The address of  a  null-terminated  string  containing  a  name  in
      DEC/Shell file specification syntax.

  action_routine

      The address of  a  routine  that  takes  as  its  only  argument  a
      null-terminated  string  containing  the  translation  of the given
      DEC/Shell name syntax to valid VMS filename  syntax.   Further,  if
      this  routine  returns  false  (low  bit  clear),  no  further file
      translation takes place.

  wild_flag

      Either a 0 or 1 passed  by  value.   If  a  0  is  specified,  then
      wildcards found in the shell_filespec are not expanded.  Otherwise,
      such  wildcards  are  expanded  and   each   is   passed   to   the
      action_routine.   Only  those expanded filenames that correspond to
      existing VMS files will be included.

3 Returns

  num_files_found

      The number of  filenames  that  result  from  the  given  DEC/Shell
      filespec.

2 SHELL$TRANSLATE_VMS

  Translates   VAX/VMS   file   specifications    to    DEC/Shell    file
  specifications.

  General high-level language format:

      shell_filespec = shell$translate_vms( vms_filespec )

  VAX C format:

      char *vms_filespec;
      char *shell$translate_vms();


