Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* VMS RTL STR$STRIM for DEC Fortran/RISC ?
@ 1992-05-14 13:36 Ray Bellis
  0 siblings, 0 replies; only message in thread
From: Ray Bellis @ 1992-05-14 13:36 UTC (permalink / raw)


Does anyone have a C (or Fortran) source module for DEC Fortran/RISC
which provides the VMS STR$TRIM function?  I've had a go at writing
it in C but as yet it doesn't work:

VMS definition is STR$TRIM(dst, src [, len])

int str_trim_(char *s1, char *s2, long *l, long l1, long l2)
{
        int             i;
        int             l0;

        *l = 0;
        l0 = (l1 < l2) ? l1 : l2;
        for (i = 0; i < l0; ++i) {
                if (*s2 != ' ' && *s2 != '\t') {
                        *l = i + 1;
                }
                *s1++ = *s2++;
        }
}

--
Thanks in Advance,

Ray.
 
------------------------------------------------------------------------------
R. P. Bellis				E-Mail:	<rpb@psy.ox.ac.uk>
Dept. of Experimental Psychology	Whois:	(RB83)
University of Oxford			Tel:	+44 865 271419
South Parks Road			Fax:	+44 865 310447
Oxford OX1 3UD
------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-05-14 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1992-05-14 13:36 VMS RTL STR$STRIM for DEC Fortran/RISC ? Ray Bellis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox