mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
63 lines
1.8 KiB
Diff
63 lines
1.8 KiB
Diff
From 6981c596ece878ff581556a719608513f88208ae Mon Sep 17 00:00:00 2001
|
|
From: Jari Aalto <jari.aalto@cante.net>
|
|
Date: Sat, 9 Jan 2010 20:40:44 +0200
|
|
Subject: [PATCH] Rename getline() to getline2() to avoid clash
|
|
|
|
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
|
|
--- catdump.c.orig
|
|
+++ catdump.c
|
|
@@ -201,7 +201,7 @@ void outhex();
|
|
void outstr();
|
|
void outjstr();
|
|
int undump();
|
|
-uchr *getline();
|
|
+uchr *getline2(); /* getline() is declared in /usr/include/stdio.h */
|
|
uchr *getvalue();
|
|
int gethex();
|
|
int hexdigit();
|
|
@@ -561,7 +561,7 @@ char *txtfile, *catalog;
|
|
err = 0;
|
|
line = 0;
|
|
|
|
- if (getline(buf, fp) == NULL ||
|
|
+ if (getline2(buf, fp) == NULL ||
|
|
strncmp(buf, CAT_ENTRY, strlen(CAT_ENTRY))) {
|
|
fprintf(stderr, "ERR: 項目 %s がありません\n", CAT_ENTRY);
|
|
fclose(fp);
|
|
@@ -571,7 +571,7 @@ char *txtfile, *catalog;
|
|
st = 0;
|
|
hdr = (HDR_T *)catbuf;
|
|
mask = 0L;
|
|
- while (getline(buf, fp) != NULL && *buf != '[') {
|
|
+ while (getline2(buf, fp) != NULL && *buf != '[') {
|
|
if ((p = getvalue(buf)) == NULL) {
|
|
fprintf(stderr, "ERR: line %d: 構文に誤りがあります\n", line);
|
|
err++;
|
|
@@ -666,7 +666,7 @@ char *txtfile, *catalog;
|
|
if (strncmp(buf, BOOK_ENTRY, strlen(BOOK_ENTRY))) {
|
|
fprintf(stderr, "ERR: line %d: 不明な項目です(%s)\n", line, buf);
|
|
err++;
|
|
- while (getline(buf, fp) != NULL && *buf != '[')
|
|
+ while (getline2(buf, fp) != NULL && *buf != '[')
|
|
;
|
|
if (*buf == '\0')
|
|
break;
|
|
@@ -680,7 +680,7 @@ char *txtfile, *catalog;
|
|
break;
|
|
}
|
|
mask = 0;
|
|
- while (getline(buf, fp) != NULL && *buf != '[') {
|
|
+ while (getline2(buf, fp) != NULL && *buf != '[') {
|
|
if ((p = getvalue(buf)) == NULL) {
|
|
fprintf(stderr, "ERR: line %d: 構文に誤りがあります\n", line);
|
|
err++;
|
|
@@ -917,7 +917,7 @@ char *txtfile, *catalog;
|
|
}
|
|
|
|
uchr *
|
|
-getline(buf, fp)
|
|
+getline2(buf, fp)
|
|
uchr *buf;
|
|
FILE *fp;
|
|
{
|