Skip to content

Commit 01149f5

Browse files
committed
Import GnuWin32 patch for Windows 2.5.9-5
1 parent 3f00223 commit 01149f5

File tree

6 files changed

+5
-232
lines changed

6 files changed

+5
-232
lines changed

manifest/patch-2.5.9-4-src.mft

Lines changed: 0 additions & 142 deletions
This file was deleted.

manifest/patch-2.5.9-5-src.mft

Whitespace-only changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Patch-2.5.9: Sources
1+
Patch-2.5.9: Sources

src/patch/2.5.9/patch-2.5.9-src/pch.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ open_patch_file (char const *filename)
121121
pfatal ("fstat");
122122
if (S_ISREG (st.st_mode) && (stdin_pos = file_tell (stdin)) != -1)
123123
{
124-
// printf ("pfp = stdin: %p\n", stdin);
125124
pfp = stdin;
126125
file_pos = stdin_pos;
127126
}
@@ -134,7 +133,6 @@ open_patch_file (char const *filename)
134133
O_RDWR | O_BINARY | exclusive,
135134
(mode_t) 0),
136135
"w+b");
137-
printf ("TMPPATNAME: %s\n", TMPPATNAME);
138136
if (!pfp)
139137
pfatal ("Can't open stream for file %s", quotearg (TMPPATNAME));
140138
for (st.st_size = 0;
@@ -158,8 +156,6 @@ open_patch_file (char const *filename)
158156
pfatal ("fstat");
159157
}
160158
p_filesize = st.st_size;
161-
printf ("p_filesize = %ld\n", p_filesize);
162-
printf ("file_pos = %ld\n", file_pos);
163159
if (p_filesize != (file_offset) p_filesize)
164160
fatal ("patch file is too long");
165161
next_intuit_at (file_pos, (LINENUM) 1);
@@ -857,14 +853,12 @@ another_hunk (enum diff difftype, bool rev)
857853
p_end--;
858854
}
859855
assert(p_end == -1);
860-
printf ("p_end = %ld\n", p_end);
861856
p_efake = -1;
862857

863858
p_max = hunkmax; /* gets reduced when --- found */
864859
if (difftype == CONTEXT_DIFF || difftype == NEW_CONTEXT_DIFF) {
865860
file_offset line_beginning = file_tell (pfp);
866861
/* file pos of the current line */
867-
printf ("line_beginning = %ld\n", line_beginning);
868862
LINENUM repl_beginning = 0; /* index of --- line */
869863
register LINENUM fillcnt = 0; /* #lines of missing ptrn or repl */
870864
register LINENUM fillsrc; /* index of first line to copy */
@@ -888,7 +882,6 @@ another_hunk (enum diff difftype, bool rev)
888882
fillsrc = filldst = repl_patch_line = repl_context = 0;
889883

890884
chars_read = get_line ();
891-
printf ("chars_read = %ld\n", chars_read);
892885
if (chars_read == (size_t) -1
893886
|| chars_read <= 8
894887
|| strncmp (buf, "********", 8) != 0) {
@@ -1259,17 +1252,14 @@ another_hunk (enum diff difftype, bool rev)
12591252
else if (difftype == UNI_DIFF) {
12601253
file_offset line_beginning = file_tell (pfp);
12611254
/* file pos of the current line */
1262-
printf ("line_beginning = %ld\n", line_beginning);
12631255
register LINENUM fillsrc; /* index of old lines */
12641256
register LINENUM filldst; /* index of new lines */
12651257
char ch = '\0';
12661258

12671259
chars_read = get_line ();
1268-
printf ("chars_read = %ld\n", chars_read);
12691260
if (chars_read == (size_t) -1
12701261
|| chars_read <= 4
12711262
|| strncmp (buf, "@@ -", 4) != 0) {
1272-
printf ("buf = %s\n", buf);
12731263
next_intuit_at(line_beginning,p_input_line);
12741264
return chars_read == (size_t) -1 ? -1 : 0;
12751265
}
@@ -1322,7 +1312,6 @@ printf ("buf = %s\n", buf);
13221312
p_hunk_beg = p_input_line + 1;
13231313
while (fillsrc <= p_ptrn_lines || filldst <= p_end) {
13241314
chars_read = get_line ();
1325-
printf ("chars_read = %ld\n", chars_read);
13261315
if (!chars_read) {
13271316
if (p_max - filldst < 3) {
13281317
strcpy (buf, " \n"); /* assume blank lines got chopped */

src/patch/2.5.9/patch-2.5.9/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ DEFS = -DINSTALLDIR=\"$(prefix)\" -DINSTALLDIR=\"$(prefix)\" -DINSTALLDIR=\"$(
4040
EXEEXT = .exe
4141
LDFLAGS = -Wl,-s -Wl,--force-exe-suffix -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--allow-multiple-definition -Wl,--enable-stdcall-fixup -LD:/Progra~1/GnuWin32/lib -Wl,--major-image-version=$(MAJOR) -Wl,--minor-image-version=$(MINOR)
4242
LIBOBJS =
43-
LIBS = -Wl,-s -LD:/Progra~1/GnuWin32/lib -lgw32c -liberty -lintl -liconv -lwsock32 -lole32 -luuid -lmsvcp60
43+
LIBS = -Wl,-s -LD:/Progra~1/GnuWin32/lib -lgw32c -liberty -lintl -lwsock32 -lole32 -luuid -lmsvcp60
4444
OBJEXT = o
4545
PACKAGE_NAME = patch
4646
PACKAGE_VERSION = 2.5.9

src/patch/2.5.9/patch-2.5.9/patches/patch-2.5.9-src.diff

Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -8552,7 +8552,7 @@ diff -ipuwr --binary --strip-trailing-cr -x '*.bak' -x '*.orig' -x '*.rej' -x '*
85528552
{
85538553
diff -ipuwr --binary --strip-trailing-cr -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x debian -x '*.po' -x '*.pot' patch-2.5.9-orig/pch.c patch-2.5.9-src/pch.c
85548554
--- patch-2.5.9-orig/pch.c 2003-05-20 16:03:17.000000000 +0200
8555-
+++ patch-2.5.9-src/pch.c 2005-07-22 19:47:52.062500000 +0200
8555+
+++ patch-2.5.9-src/pch.c 2006-04-26 20:54:05.408483500 +0200
85568556
@@ -1,6 +1,6 @@
85578557
/* reading patches */
85588558

@@ -8561,32 +8561,7 @@ diff -ipuwr --binary --strip-trailing-cr -x '*.bak' -x '*.orig' -x '*.rej' -x '*
85618561

85628562
/* Copyright (C) 1986, 1987, 1988 Larry Wall
85638563

8564-
@@ -121,6 +121,7 @@ open_patch_file (char const *filename)
8565-
pfatal ("fstat");
8566-
if (S_ISREG (st.st_mode) && (stdin_pos = file_tell (stdin)) != -1)
8567-
{
8568-
+// printf ("pfp = stdin: %p\n", stdin);
8569-
pfp = stdin;
8570-
file_pos = stdin_pos;
8571-
}
8572-
@@ -133,6 +134,7 @@ open_patch_file (char const *filename)
8573-
O_RDWR | O_BINARY | exclusive,
8574-
(mode_t) 0),
8575-
"w+b");
8576-
+ printf ("TMPPATNAME: %s\n", TMPPATNAME);
8577-
if (!pfp)
8578-
pfatal ("Can't open stream for file %s", quotearg (TMPPATNAME));
8579-
for (st.st_size = 0;
8580-
@@ -156,6 +158,8 @@ open_patch_file (char const *filename)
8581-
pfatal ("fstat");
8582-
}
8583-
p_filesize = st.st_size;
8584-
+ printf ("p_filesize = %ld\n", p_filesize);
8585-
+ printf ("file_pos = %ld\n", file_pos);
8586-
if (p_filesize != (file_offset) p_filesize)
8587-
fatal ("patch file is too long");
8588-
next_intuit_at (file_pos, (LINENUM) 1);
8589-
@@ -366,10 +370,16 @@ intuit_diff_type (void)
8564+
@@ -366,10 +366,16 @@ intuit_diff_type (void)
85908565
if (!stars_last_line && strnEQ(s, "*** ", 4))
85918566
name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
85928567
else if (strnEQ(s, "+++ ", 4))
@@ -8603,63 +8578,14 @@ diff -ipuwr --binary --strip-trailing-cr -x '*.bak' -x '*.orig' -x '*.rej' -x '*
86038578
else if (strnEQ(s, "Prereq:", 7)) {
86048579
for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
86058580
continue;
8606-
@@ -409,6 +419,7 @@ intuit_diff_type (void)
8581+
@@ -409,6 +415,7 @@ intuit_diff_type (void)
86078582
p_timestamp[NEW] = timestamp;
86088583
p_rfc934_nesting = (t - s) >> 1;
86098584
}
86108585
+ p_strip_trailing_cr = strip_trailing_cr;
86118586
}
86128587
}
86138588
if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
8614-
@@ -846,12 +857,14 @@ another_hunk (enum diff difftype, bool r
8615-
p_end--;
8616-
}
8617-
assert(p_end == -1);
8618-
+ printf ("p_end = %ld\n", p_end);
8619-
p_efake = -1;
8620-
8621-
p_max = hunkmax; /* gets reduced when --- found */
8622-
if (difftype == CONTEXT_DIFF || difftype == NEW_CONTEXT_DIFF) {
8623-
file_offset line_beginning = file_tell (pfp);
8624-
/* file pos of the current line */
8625-
+ printf ("line_beginning = %ld\n", line_beginning);
8626-
LINENUM repl_beginning = 0; /* index of --- line */
8627-
register LINENUM fillcnt = 0; /* #lines of missing ptrn or repl */
8628-
register LINENUM fillsrc; /* index of first line to copy */
8629-
@@ -875,6 +888,7 @@ another_hunk (enum diff difftype, bool r
8630-
fillsrc = filldst = repl_patch_line = repl_context = 0;
8631-
8632-
chars_read = get_line ();
8633-
+ printf ("chars_read = %ld\n", chars_read);
8634-
if (chars_read == (size_t) -1
8635-
|| chars_read <= 8
8636-
|| strncmp (buf, "********", 8) != 0) {
8637-
@@ -1245,14 +1259,17 @@ another_hunk (enum diff difftype, bool r
8638-
else if (difftype == UNI_DIFF) {
8639-
file_offset line_beginning = file_tell (pfp);
8640-
/* file pos of the current line */
8641-
+ printf ("line_beginning = %ld\n", line_beginning);
8642-
register LINENUM fillsrc; /* index of old lines */
8643-
register LINENUM filldst; /* index of new lines */
8644-
char ch = '\0';
8645-
8646-
chars_read = get_line ();
8647-
+ printf ("chars_read = %ld\n", chars_read);
8648-
if (chars_read == (size_t) -1
8649-
|| chars_read <= 4
8650-
|| strncmp (buf, "@@ -", 4) != 0) {
8651-
+printf ("buf = %s\n", buf);
8652-
next_intuit_at(line_beginning,p_input_line);
8653-
return chars_read == (size_t) -1 ? -1 : 0;
8654-
}
8655-
@@ -1305,6 +1322,7 @@ another_hunk (enum diff difftype, bool r
8656-
p_hunk_beg = p_input_line + 1;
8657-
while (fillsrc <= p_ptrn_lines || filldst <= p_end) {
8658-
chars_read = get_line ();
8659-
+printf ("chars_read = %ld\n", chars_read);
8660-
if (!chars_read) {
8661-
if (p_max - filldst < 3) {
8662-
strcpy (buf, " \n"); /* assume blank lines got chopped */
86638589
diff -ipuwr --binary --strip-trailing-cr -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x debian -x '*.po' -x '*.pot' patch-2.5.9-orig/quotearg.c patch-2.5.9-src/quotearg.c
86648590
--- patch-2.5.9-orig/quotearg.c 2002-11-23 07:45:49.000000000 +0100
86658591
+++ patch-2.5.9-src/quotearg.c 2005-03-24 00:18:53.953125000 +0100

0 commit comments

Comments
 (0)