All pastes #194800 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-10-08 08:49 UTC
rendered paste body
struct ZIPEntry {
	uint16_t modTime
			 modDate;
	uint32_t crc,
			 compressedSize,
			 unCompressedSize,
			 offset,
			 compressed;
	char *   fileName;
	
	struct ZIPEntry *nextEntry;
};

typedef struct {
	ZIPEntry *firstEntry;
	uint32_t length;
} ZIPList;


/* *** *** *** *** */

void addEntryToList ( ZIPList *list, ZIPEntry *newEntry )
{
	if ( list->firstEntry == NULL || list->length == 0 ) {
		list->firstEntry = newEntry;
		list->lastEntry = newEntry;
		list->length = 1;
	} else {
		list->lastEntry->nextEntry = newEntry;
		list->lastEntry = newEntry;
		list->length++;
	}
}