Annotation of researchv9/sys/h/order.h, revision 1.1

1.1     ! root        1: /*
        !             2:  *             O R D E R . H
        !             3:  *
        !             4:  * Used to re-arrange shorts and longs to or from a specific byte ordering.
        !             5:  * The hfirst macros are for high-order byte first; the lfirst macros are
        !             6:  * for low-order byte first.
        !             7:  *
        !             8:  * IMPORTANT: The definitions of order_hfirst and order_lfirst may have to be
        !             9:  *   exchanged, depending on the native byte ordering of the machine.
        !            10:  *
        !            11:  */
        !            12: 
        !            13: #define hfirst_short(x)  ((short)order_hfirst((x), sizeof(short)))
        !            14: #define lfirst_short(x)  ((short)order_lfirst((x), sizeof(short)))
        !            15: 
        !            16: #define hfirst_long(x)   ((long)order_hfirst((x), sizeof(long)))
        !            17: #define lfirst_long(x)   ((long)order_lfirst((x), sizeof(long)))
        !            18: 
        !            19: #define order_hfirst(x,size)  switch_order((long)(x), size)
        !            20: #define order_lfirst(x,size)  (long)(x)
        !            21: 
        !            22: long switch_order();

unix.superglobalmegacorp.com

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