URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/eco32/trunk/disk/tools/shpart
- from Rev 24 to Rev 258
- ↔ Reverse comparison
Rev 24 → Rev 258
/shpart.c
15,9 → 15,9
|
|
typedef struct { |
unsigned long type; |
unsigned long start; |
unsigned long size; |
unsigned int type; |
unsigned int start; |
unsigned int size; |
char descr[DESCR_SIZE]; |
} PartEntry; |
|
42,11 → 42,11
/**************************************************************/ |
|
|
unsigned long getNumber(unsigned char *p) { |
return (unsigned long) *(p + 0) << 24 | |
(unsigned long) *(p + 1) << 16 | |
(unsigned long) *(p + 2) << 8 | |
(unsigned long) *(p + 3) << 0; |
unsigned int getNumber(unsigned char *p) { |
return (unsigned int) *(p + 0) << 24 | |
(unsigned int) *(p + 1) << 16 | |
(unsigned int) *(p + 2) << 8 | |
(unsigned int) *(p + 3) << 0; |
} |
|
|
70,8 → 70,8
char *diskName; |
FILE *disk; |
unsigned long diskSize; |
unsigned long numSectors; |
unsigned long partLast; |
unsigned int numSectors; |
unsigned int partLast; |
int i, j; |
char c; |
|
90,7 → 90,7
diskSize = ftell(disk); |
numSectors = diskSize / SECTOR_SIZE; |
fclose(disk); |
printf("Disk '%s' has %lu (0x%lX) sectors.\n", |
printf("Disk '%s' has %u (0x%X) sectors.\n", |
diskName, numSectors, numSectors); |
if (numSectors < 32) { |
error("disk is too small"); |
118,7 → 118,7
} else { |
partLast = 0; |
} |
printf("%2d %s 0x%08lX 0x%08lX 0x%08lX 0x%08lX ", |
printf("%2d %s 0x%08X 0x%08X 0x%08X 0x%08X ", |
i, |
ptr[i].type & 0x80000000 ? "*" : " ", |
ptr[i].type & 0x7FFFFFFF, |
/Makefile
4,7 → 4,7
|
BUILD = ../../../build |
|
CC = gcc -m32 |
CC = gcc |
CFLAGS = -g -Wall |
LDFLAGS = -g |
LDLIBS = -lm |