Annotation of researchv10no/cmd/basic/bite/src/random.c, revision 1.1

1.1     ! root        1: /* Copyright Bell Telephone Laboratories Whippany, N.J.
        !             2: 
        !             3:  *     /////////////////////////////////////
        !             4:  *     /////////////////////////////////////
        !             5:  *     ///////////// random.c //////////////
        !             6:  *     /// J. P. Hawkins WH X4610 8C-001 ///
        !             7:  *     ///// Fri Aug 24 17:31:02 1979 //////
        !             8:  *     /////////////////////////////////////
        !             9:  *     /////////////////////////////////////
        !            10: 
        !            11:  * Pland a random seed (RANDOMIZE COMMAND)
        !            12:  */
        !            13: /*   "@(#) random.c:  V 1.3  3/22/81" */
        !            14: #include       "bas.h"
        !            15: 
        !            16: #ifdef LSX
        !            17: extern int     ticks;          /* LTC 1/60th sec counter */
        !            18: #endif
        !            19: 
        !            20: _random()
        !            21: {
        !            22: #ifndef        LSX
        !            23:        long tm;
        !            24:        time(&tm);
        !            25:        srand(tm);      /* seed random gen with system time */
        !            26: #endif
        !            27: #ifdef LSX
        !            28:        srand(ticks);   /* seed with current clock for LSX */
        !            29: #endif
        !            30: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.