URL
https://opencores.org/ocsvn/mlite/mlite/trunk
[/] [mlite/] [trunk/] [tools/] [convert.c] - Diff between revs 136 and 169
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 136 |
Rev 169 |
Line 6... |
Line 6... |
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <string.h>
|
|
|
#define BUF_SIZE (1024*1024*4)
|
#define BUF_SIZE (1024*1024*4)
|
/*Assumes running on PC little endian*/
|
/*Assumes running on PC little endian*/
|
|
#ifndef LITTLE_ENDIAN
|
#define ntohl(A) (((A)>>24)|(((A)&0x00ff0000)>>8)|(((A)&0xff00)<<8)|((A)<<24))
|
#define ntohl(A) (((A)>>24)|(((A)&0x00ff0000)>>8)|(((A)&0xff00)<<8)|((A)<<24))
|
#define ntohs(A) (unsigned short)((((A)&0xff00)>>8)|((A)<<8))
|
#define ntohs(A) (unsigned short)((((A)&0xff00)>>8)|((A)<<8))
|
|
#else
|
|
#define ntohl(A) A
|
|
#define ntohs(A) A
|
|
#endif
|
|
|
#define EI_NIDENT 16
|
#define EI_NIDENT 16
|
#define SHT_PROGBITS 1
|
#define SHT_PROGBITS 1
|
#define SHT_STRTAB 3
|
#define SHT_STRTAB 3
|
#define SHT_NOBITS 8
|
#define SHT_NOBITS 8
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.