home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / flistfrontend / src / sytrnlog.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-19  |  1.2 KB  |  55 lines

  1. #ifndef    NO_IDENT
  2. static    char    *Id = "$Id: sytrnlog.c,v 1.6 1995/10/19 10:39:40 tom Exp $";
  3. #endif
  4.  
  5. /*
  6.  * Title:    systrnlog.c
  7.  * Author:    Thomas E. Dickey
  8.  * Created:    11 Apr 1985
  9.  * Last update:
  10.  *        19 Oct 1995, clean compile with DEC C.
  11.  *        19 Feb 1995, str/sys utils prototypes
  12.  *        11 Apr 1985
  13.  *
  14.  * Function:    Translate the given name 'tofind' until no more logical
  15.  *        symbol substitutions can be made.  The result string must
  16.  *        be long enough for the longest VMS name (255).
  17.  *
  18.  * Arguments:    result    - result buffer
  19.  *        tofind    - name to find
  20.  */
  21.  
  22. #include    <starlet.h>
  23. #include    <string.h>
  24. #include    <rms.h>
  25. #include    <iodef.h>
  26. #include    <descrip.h>
  27. #include    <ssdef.h>
  28.  
  29. #include    "bool.h"
  30.  
  31. #include    "strutils.h"
  32. #include    "sysutils.h"
  33.  
  34. void
  35. systrnlog (char    *result, char *tofind)
  36. {
  37.     struct
  38.     dsc$descriptor_s    Idsc, Odsc;
  39.     int    status    = 0;
  40.     short    rsllen;
  41.  
  42.     strucpy (result, tofind);    /* Make sure name is in caps */
  43.     while (status != SS$_NOTRAN)
  44.     {
  45.         Idsc.dsc$a_pointer= result;
  46.         Idsc.dsc$w_length = strlen(result);
  47.         Idsc.dsc$b_dtype  = DSC$K_DTYPE_T;
  48.         Idsc.dsc$b_class  = DSC$K_CLASS_S;
  49.         Odsc = Idsc;
  50.         Odsc.dsc$w_length = NAM$C_MAXRSS;
  51.         status = sys$trnlog (&Idsc, &rsllen, &Odsc, 0,0,0);
  52.         result[rsllen] = EOS;
  53.     }
  54. }
  55.