move_data_endian.c   move_data_endian.c 
skipping to change at line 13 skipping to change at line 13
#include "test.h" #include "test.h"
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <unistd.h>
int main(void) int main(void)
{ {
const char* filedir = __TEST__ "dirfile"; const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format"; const char* format = __TEST__ "dirfile/format";
const char* format1 = __TEST__ "dirfile/format1"; const char* format1 = __TEST__ "dirfile/format1";
const char* data = __TEST__ "dirfile/data"; const char* data = __TEST__ "dirfile/data";
const char* format_data = "/INCLUDE format1\ndata RAW UINT16 11"; const char* format_data = "/INCLUDE format1\ndata RAW UINT16 11";
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
const char* format1_data = "ENDIAN little\n"; const char* format1_data = "ENDIAN little\n";
skipping to change at line 58 skipping to change at line 57
D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE); D = gd_open(filedir, GD_RDWR | GD_UNENCODED | GD_VERBOSE);
ret = gd_move(D, "data", 1, 1); ret = gd_move(D, "data", 1, 1);
error = gd_error(D); error = gd_error(D);
ge_ret = gd_entry(D, "data", &E); ge_ret = gd_entry(D, "data", &E);
gd_close(D); gd_close(D);
fd = open(data, O_RDONLY | O_BINARY); fd = open(data, O_RDONLY | O_BINARY);
i = 0; i = 0;
while (read(fd, &d, sizeof(uint16_t))) { if (fd == -1) {
CHECKXi(i, d, i * 0x102); perror("open: ");
i++; r = 1;
} else {
while (read(fd, &d, sizeof(uint16_t))) {
CHECKXi(i, d, i * 0x102);
i++;
}
close(fd);
} }
close(fd);
unlink(format1); unlink(format1);
unlink(format); unlink(format);
unlink(data); unlink(data);
rmdir(filedir); rmdir(filedir);
CHECKI(ret, 0); CHECKI(ret, 0);
CHECKI(error, GD_E_OK); CHECKI(error, GD_E_OK);
CHECKI(ge_ret, 0); CHECKI(ge_ret, 0);
CHECKI(E.fragment_index, 1); CHECKI(E.fragment_index, 1);
 End of changes. 3 change blocks. 
5 lines changed or deleted 9 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/