Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tail(3C) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                 tail(3C)



        _________________________________________________________________
        tail                                                     function
        Return a pointer to the null byte within a string.
        _________________________________________________________________


        Calling Sequence

        char *string, *last;
        char *tail();
        last = tail(string);


          where   string is a character array.
                  last points to the null byte within the string.



        Description

        The tail function locates the null byte within a string and
        returns a pointer to it.


        Returns

        The tail function returns the pointer to the null byte.


        Related Functions

        See also the strlen function.


        Example

        /* Program test for the tail() function */

        #include <stdio.h>
        #define MAX   80

        char  *last, *tail();
        int    i = 1;

        main(argc, argv)
        int    argc;
        char  *argv[];
        {
            while (i < argc) {
                printf("argv[%d] = '%s'", i, argv[i]);
                printf("\nbegins at %o and ends at %o.\n",



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                 tail(3C)



                argv[i], last = tail(argv[i]));
                i++;
            }
        }

        A call to the program test with

        x test Where are these lines?

        generates the output

        argv[1] = 'Where'
        begins at 34000025473 and ends at 34000025500.
        argv[2] = 'are'
        begins at 34000025501 and ends at 34000025504.
        argv[3] = 'these'
        begins at 34000025505 and ends at 34000025512.
        argv[4] = 'lines?'
        begins at 34000025513 and ends at 34000025521.

        (These locations will vary with execution.)

































        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026