From: Eric S. Raymond Date: Thu, 4 Sep 2003 21:45:28 +0000 (+0000) Subject: Use network byte order. X-Git-Tag: 1.0~14 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=d91a362648b4ae8d1bcdf29775eaaef7bcf776ed;p=comparator.git Use network byte order. --- diff --git a/main.c b/main.c index 932bb2a..0878ed5 100644 --- a/main.c +++ b/main.c @@ -130,10 +130,8 @@ static void write_scf(const char *tree, FILE *ofp) this.hash[14], this.hash[15], *place, this.start, this.end); -#ifdef NON_NATIVE this.start = TONET(this.start); this.end = TONET(this.end); -#endif /* NON_NATIVE */ fwrite(&this.start, sizeof(linenum_t), 1, ofp); fwrite(&this.end, sizeof(linenum_t), 1, ofp); fwrite(&this.hash, sizeof(char), HASHSIZE, ofp); @@ -176,10 +174,8 @@ void merge_scf(const char *name, FILE *fp) fread(&this.start, sizeof(linenum_t), 1, fp); fread(&this.end, sizeof(linenum_t), 1, fp); fread(this.hash, sizeof(char), HASHSIZE, fp); -#ifdef NON_NATIVE this.start = FROMNET(this.start); this.end = FROMNET(this.end); -#endif /* NON_NATIVE */ corehook(this, name); hashcount++; if (hashcount % 10000 == 0)