getline -> get_line; from Gonzalo L. R.
This commit is contained in:
parent
c01d102371
commit
5c2859c0d8
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.28 2011/09/16 11:41:41 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.29 2012/03/17 15:10:47 naddy Exp $
|
||||
|
||||
COMMENT= graphical front end to Unix diff
|
||||
|
||||
DISTNAME= mgdiff
|
||||
PKGNAME= ${DISTNAME}-1.0
|
||||
REVISION= 5
|
||||
REVISION= 6
|
||||
CATEGORIES= textproc
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_XCONTRIB:=applications/}
|
||||
|
93
textproc/mgdiff/patches/patch-rundiff_c
Normal file
93
textproc/mgdiff/patches/patch-rundiff_c
Normal file
@ -0,0 +1,93 @@
|
||||
$OpenBSD: patch-rundiff_c,v 1.1 2012/03/17 15:10:48 naddy Exp $
|
||||
--- rundiff.c.orig Sat Mar 17 11:47:07 2012
|
||||
+++ rundiff.c Sat Mar 17 11:47:46 2012
|
||||
@@ -63,7 +63,7 @@ typedef enum { ADD = 1, CHANGE, DELETE, IGNORE, ERROR}
|
||||
static char *duplicate (char *s, int *flag);
|
||||
static DiffType parse_diff_line (char *buf, int *f1n1, int *f1n2, int *f2n1, int *f2n2);
|
||||
static int eatline (FILE *f);
|
||||
-static void getline (FILE *f, char **cooked, char **raw);
|
||||
+static void get_line (FILE *f, char **cooked, char **raw);
|
||||
static void reset_blist (void);
|
||||
static Block *get_blist (void);
|
||||
static void add_blist (Block *b);
|
||||
@@ -271,7 +271,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
|
||||
b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[LEFT].fsize; i++) {
|
||||
- getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
+ get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
|
||||
if (di->maxcols < b->arr[LEFT].tlen[i]) {
|
||||
di->maxcols = b->arr[LEFT].tlen[i];
|
||||
@@ -300,7 +300,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[RIGHT].wtext = (char **) calloc (b->arr[RIGHT].fsize, sizeof (char *));
|
||||
b->arr[RIGHT].tlen = (short *) calloc (b->arr[RIGHT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[RIGHT].fsize; i++) {
|
||||
- getline (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
|
||||
+ get_line (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
|
||||
b->arr[RIGHT].tlen[i] = strlen (b->arr[RIGHT].text[i]);
|
||||
if (di->maxcols < b->arr[RIGHT].tlen[i]) {
|
||||
di->maxcols = b->arr[RIGHT].tlen[i];
|
||||
@@ -331,7 +331,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
|
||||
b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[LEFT].fsize; i++) {
|
||||
- getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
+ get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
|
||||
if (di->maxcols < b->arr[LEFT].tlen[i]) {
|
||||
di->maxcols = b->arr[LEFT].tlen[i];
|
||||
@@ -358,7 +358,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
|
||||
b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[LEFT].fsize; i++) {
|
||||
- getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
+ get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
|
||||
if (di->maxcols < b->arr[LEFT].tlen[i]) {
|
||||
di->maxcols = b->arr[LEFT].tlen[i];
|
||||
@@ -371,7 +371,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[RIGHT].wtext = (char **) calloc (b->arr[RIGHT].fsize, sizeof (char *));
|
||||
b->arr[RIGHT].tlen = (short *) calloc (b->arr[RIGHT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[RIGHT].fsize; i++) {
|
||||
- getline (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
|
||||
+ get_line (file2, &b->arr[RIGHT].text[i], &b->arr[RIGHT].wtext[i]);
|
||||
b->arr[RIGHT].tlen[i] = strlen (b->arr[RIGHT].text[i]);
|
||||
if (di->maxcols < b->arr[RIGHT].tlen[i]) {
|
||||
di->maxcols = b->arr[RIGHT].tlen[i];
|
||||
@@ -399,7 +399,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
|
||||
b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[LEFT].fsize; i++) {
|
||||
- getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
+ get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
|
||||
if (di->maxcols < b->arr[LEFT].tlen[i]) {
|
||||
di->maxcols = b->arr[LEFT].tlen[i];
|
||||
@@ -428,7 +428,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
|
||||
b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[LEFT].fsize; i++) {
|
||||
- getline (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
+ get_line (file1, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
|
||||
if (di->maxcols < b->arr[LEFT].tlen[i]) {
|
||||
di->maxcols = b->arr[LEFT].tlen[i];
|
||||
@@ -491,7 +491,7 @@ DiffInfo *build_diff_info (char *prog, char *args, cha
|
||||
b->arr[LEFT].wtext = (char **) calloc (b->arr[LEFT].fsize, sizeof (char *));
|
||||
b->arr[LEFT].tlen = (short *) calloc (b->arr[LEFT].fsize, sizeof (short));
|
||||
for (i = 0; i < b->arr[LEFT].fsize; i++) {
|
||||
- getline (file2, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
+ get_line (file2, &b->arr[LEFT].text[i], &b->arr[LEFT].wtext[i]);
|
||||
b->arr[LEFT].tlen[i] = strlen (b->arr[LEFT].text[i]);
|
||||
if (di->maxcols < b->arr[LEFT].tlen[i]) {
|
||||
di->maxcols = b->arr[LEFT].tlen[i];
|
||||
@@ -663,7 +663,7 @@ static int eatline (FILE *f)
|
||||
* printable) if necessary. Silently truncate input lines at BUFSIZ
|
||||
* characters.
|
||||
*/
|
||||
-static void getline (FILE *f, char **cooked, char **raw)
|
||||
+static void get_line (FILE *f, char **cooked, char **raw)
|
||||
{
|
||||
char buffer[BUFSIZ+1];
|
||||
char *s;
|
Loading…
Reference in New Issue
Block a user