"Fossies" - the Fresh Open Source Software Archive

Member "xorriso-1.5.4/libjte/endianconv.h" (30 Jan 2021, 1114 Bytes) of package /linux/misc/xorriso-1.5.4.pl02.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "endianconv.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * endianconv.h
    3  *
    4  * Copyright (c) 2004-2006 Steve McIntyre <steve@einval.com>
    5  *
    6  * Simple helper routines for marshalling data - prototypes
    7  *
    8  * GNU GPL v2
    9  */
   10 
   11 #ifndef _JTE_ENDIANCONV_H_
   12 #define _JTE_ENDIANCONV_H_
   13 
   14 void                  write_be64(uint64_t in, unsigned char *out);
   15 uint64_t              read_be64(unsigned char *in);
   16 void                  write_le64(uint64_t in, unsigned char *out);
   17 uint64_t              read_le64(unsigned char *in);
   18 
   19 void                  write_le48(uint64_t in, unsigned char *out);
   20 uint64_t              read_le48(unsigned char *in);
   21 
   22 void                  write_be32(unsigned long in, unsigned char *out);
   23 unsigned long         read_be32(unsigned char *in);
   24 void                  write_le32(unsigned long in, unsigned char *out);
   25 unsigned long         read_le32(unsigned char *in);
   26 
   27 void                  write_be16(unsigned short in, unsigned char *out);
   28 unsigned short        read_be16(unsigned char *in);
   29 void                  write_le16(unsigned short in, unsigned char *out);
   30 unsigned short        read_le16(unsigned char *in);
   31 
   32 #endif
   33 /* _JTE_ENDIANCONV_H_ */