From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Robert Schwebel Date: Sun, 30 Oct 2011 23:00:48 +0100 Message-Id: <1320012059-24971-17-git-send-email-r.schwebel@pengutronix.de> In-Reply-To: <1320012059-24971-1-git-send-email-r.schwebel@pengutronix.de> References: <20111030220011.GK14918@pengutronix.de> <1320012059-24971-1-git-send-email-r.schwebel@pengutronix.de> Subject: [ptxdist] [PATCH 17/28] efax: clean up patches Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Robert Schwebel Signed-off-by: Robert Schwebel --- patches/efax-0.9/0001-fix-rd_state.patch | 28 +++++++++++ patches/efax-0.9/0002-add-nullpointer-check.patch | 50 ++++++++++++++++++++ patches/efax-0.9/0003-fix-l-option-in-efix.patch | 44 +++++++++++++++++ .../efax-0.9/0004-add-missing-include-file.patch | 25 ++++++++++ patches/efax-0.9/efax-0.9-misc.patch | 22 --------- patches/efax-0.9/efax-0.9-nullptr.patch | 42 ---------------- patches/efax-0.9/efax-0.9-numlines.patch | 38 --------------- patches/efax-0.9/efax08a-time.patch | 19 ------- patches/efax-0.9/series | 4 -- 9 files changed, 147 insertions(+), 125 deletions(-) create mode 100644 patches/efax-0.9/0001-fix-rd_state.patch create mode 100644 patches/efax-0.9/0002-add-nullpointer-check.patch create mode 100644 patches/efax-0.9/0003-fix-l-option-in-efix.patch create mode 100644 patches/efax-0.9/0004-add-missing-include-file.patch delete mode 100644 patches/efax-0.9/efax-0.9-misc.patch delete mode 100644 patches/efax-0.9/efax-0.9-nullptr.patch delete mode 100644 patches/efax-0.9/efax-0.9-numlines.patch delete mode 100644 patches/efax-0.9/efax08a-time.patch delete mode 100644 patches/efax-0.9/series diff --git a/patches/efax-0.9/0001-fix-rd_state.patch b/patches/efax-0.9/0001-fix-rd_state.patch new file mode 100644 index 0000000..3179248 --- /dev/null +++ b/patches/efax-0.9/0001-fix-rd_state.patch @@ -0,0 +1,28 @@ +From fa03dff46d41a509c4cfbb81d132ca6b6e408f00 Mon Sep 17 00:00:00 2001 +From: Robert Schwebel +Date: Sat, 29 Oct 2011 19:13:38 +0200 +Subject: [PATCH 1/4] fix rd_state + +Patch taken from redhat. + +Signed-off-by: Robert Schwebel +--- + efax.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/efax.c b/efax.c +index 42880d2..bdcd462 100644 +--- a/efax.c ++++ b/efax.c +@@ -759,7 +759,7 @@ int readfaxruns ( TFILE *f, DECODER *d, short *runs, int *pels ) + c = tgetd ( f, TO_CHAR ) ; + + rd_state = ( rd_state & rd_allowed[c] ) ? +- ( ( rd_state & rd_nexts[c] ) ? rd_state <<= 1 : rd_state ) : ++ ( ( rd_state & rd_nexts[c] ) ? rd_state << 1 : rd_state ) : + RD_BEGIN ; + + if ( rd_state == RD_END ) +-- +1.7.7 + diff --git a/patches/efax-0.9/0002-add-nullpointer-check.patch b/patches/efax-0.9/0002-add-nullpointer-check.patch new file mode 100644 index 0000000..38e5a0d --- /dev/null +++ b/patches/efax-0.9/0002-add-nullpointer-check.patch @@ -0,0 +1,50 @@ +From c19adac8ff45c15175263af94c818d7f9d7061a8 Mon Sep 17 00:00:00 2001 +From: Robert Schwebel +Date: Sat, 29 Oct 2011 19:13:38 +0200 +Subject: [PATCH 2/4] add nullpointer check + +Patch taken from redhat. + +Signed-off-by: Robert Schwebel +--- + efax.c | 1 + + efaxos.c | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/efax.c b/efax.c +index bdcd462..28f7fca 100644 +--- a/efax.c ++++ b/efax.c +@@ -2186,6 +2186,7 @@ int main( int argc, char **argv) + + /* print initial message to both stderr & stdout */ + argv0 = argv[0] ; ++ memset((void *)lkfile, 0, sizeof(lkfile)); /* random effects on sparc linux */ + verb[1] = "ewia" ; + msg ( "I " Version " " Copyright ) ; + argv0 = efaxbasename ( argv0 ) ; +diff --git a/efaxos.c b/efaxos.c +index 6b346d6..dc3ae33 100644 +--- a/efaxos.c ++++ b/efaxos.c +@@ -482,7 +482,7 @@ int lockall ( char **lkfiles, int log ) + { + int err = 0 ; + char **p = lkfiles ; +- while ( *p && ! err ) ++ while ( *p && **p && ! err ) + if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ; + return err ; + } +@@ -495,7 +495,7 @@ int unlockall ( char **lkfiles ) + { + int err = 0, i ; + char **p = lkfiles ; +- while ( *p ) ++ while ( *p && **p ) + if ( ( i = ttunlock ( *p++ ) ) != 0 ) err = i ; + return err ; + } +-- +1.7.7 + diff --git a/patches/efax-0.9/0003-fix-l-option-in-efix.patch b/patches/efax-0.9/0003-fix-l-option-in-efix.patch new file mode 100644 index 0000000..75af458 --- /dev/null +++ b/patches/efax-0.9/0003-fix-l-option-in-efix.patch @@ -0,0 +1,44 @@ +From 150269460c978caf2eac057fff4ac9baaf30aede Mon Sep 17 00:00:00 2001 +From: Robert Schwebel +Date: Sat, 29 Oct 2011 19:13:38 +0200 +Subject: [PATCH 3/4] fix -l option in efix + +This patch fixes the '-l' option in efix 0.3 which is part of efax 0.9. +Without this patch, lines on page 2 and subsequent are missing if the +specified number of lines per page is lower than the default (66). + +This patch was taken from redhat, probably first written by +mschwendt@yahoo.com. + +Signed-off-by: Robert Schwebel +--- + efix.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/efix.c b/efix.c +index 57f96ff..984f158 100644 +--- a/efix.c ++++ b/efix.c +@@ -297,6 +297,9 @@ int main( int argc, char **argv) + + if ( ! err && ! done ) { + ++ if ( pfont ) ifile.font = pfont ; ++ if ( pglines ) ifile.pglines = pglines ; ++ + if ( nxtoptind < argc ) { + ifnames = argv + nxtoptind ; + if ( argv [ argc ] ) { +@@ -308,9 +311,6 @@ int main( int argc, char **argv) + err = msg ( "E3 missing input file name" ) ; + } + +- if ( pfont ) ifile.font = pfont ; +- if ( pglines ) ifile.pglines = pglines ; +- + newIFILE ( &ovfile, ovfnames ) ; + + newOFILE ( &ofile, oformat, ofname, 0, 0, 0, 0 ) ; +-- +1.7.7 + diff --git a/patches/efax-0.9/0004-add-missing-include-file.patch b/patches/efax-0.9/0004-add-missing-include-file.patch new file mode 100644 index 0000000..f3fe041 --- /dev/null +++ b/patches/efax-0.9/0004-add-missing-include-file.patch @@ -0,0 +1,25 @@ +From 9034141533a34c4497e91d00fbe4f00b278ff60f Mon Sep 17 00:00:00 2001 +From: Robert Schwebel +Date: Sat, 29 Oct 2011 19:13:38 +0200 +Subject: [PATCH 4/4] add missing include file + +Signed-off-by: Robert Schwebel +--- + efaxio.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/efaxio.c b/efaxio.c +index 5b8dbde..1e3a1fd 100644 +--- a/efaxio.c ++++ b/efaxio.c +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + + #include "efaxio.h" /* EFAX */ + #include "efaxmsg.h" +-- +1.7.7 + diff --git a/patches/efax-0.9/efax-0.9-misc.patch b/patches/efax-0.9/efax-0.9-misc.patch deleted file mode 100644 index 34ae3cf..0000000 --- a/patches/efax-0.9/efax-0.9-misc.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Robert Schwebel -Subject: [efax] fix rd_state - -Patch taken from redhat. - -Signed-off-by: Robert Schwebel - ---- - efax.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/efax.c -+++ b/efax.c -@@ -759,7 +759,7 @@ int readfaxruns ( TFILE *f, DECODER *d, - c = tgetd ( f, TO_CHAR ) ; - - rd_state = ( rd_state & rd_allowed[c] ) ? -- ( ( rd_state & rd_nexts[c] ) ? rd_state <<= 1 : rd_state ) : -+ ( ( rd_state & rd_nexts[c] ) ? rd_state << 1 : rd_state ) : - RD_BEGIN ; - - if ( rd_state == RD_END ) diff --git a/patches/efax-0.9/efax-0.9-nullptr.patch b/patches/efax-0.9/efax-0.9-nullptr.patch deleted file mode 100644 index 9820248..0000000 --- a/patches/efax-0.9/efax-0.9-nullptr.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Robert Schwebel -Subject: [efax] add nullpointer check - -Patch taken from redhat. - -Signed-off-by: Robert Schwebel - ---- - efax.c | 1 + - efaxos.c | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - ---- a/efax.c -+++ b/efax.c -@@ -2186,6 +2186,7 @@ int main( int argc, char **argv) - - /* print initial message to both stderr & stdout */ - argv0 = argv[0] ; -+ memset((void *)lkfile, 0, sizeof(lkfile)); /* random effects on sparc linux */ - verb[1] = "ewia" ; - msg ( "I " Version " " Copyright ) ; - argv0 = efaxbasename ( argv0 ) ; ---- a/efaxos.c -+++ b/efaxos.c -@@ -482,7 +482,7 @@ int lockall ( char **lkfiles, int log ) - { - int err = 0 ; - char **p = lkfiles ; -- while ( *p && ! err ) -+ while ( *p && **p && ! err ) - if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ; - return err ; - } -@@ -495,7 +495,7 @@ int unlockall ( char **lkfiles ) - { - int err = 0, i ; - char **p = lkfiles ; -- while ( *p ) -+ while ( *p && **p ) - if ( ( i = ttunlock ( *p++ ) ) != 0 ) err = i ; - return err ; - } diff --git a/patches/efax-0.9/efax-0.9-numlines.patch b/patches/efax-0.9/efax-0.9-numlines.patch deleted file mode 100644 index 5162de4..0000000 --- a/patches/efax-0.9/efax-0.9-numlines.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Robert Schwebel -Subject: [efax] fix -l option in efix - -This patch fixes the '-l' option in efix 0.3 which is part of efax 0.9. -Without this patch, lines on page 2 and subsequent are missing if the -specified number of lines per page is lower than the default (66). - -This patch was taken from redhat, probably first written by -mschwendt@yahoo.com. - -Signed-off-by: Robert Schwebel - ---- - efix.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/efix.c -+++ b/efix.c -@@ -297,6 +297,9 @@ int main( int argc, char **argv) - - if ( ! err && ! done ) { - -+ if ( pfont ) ifile.font = pfont ; -+ if ( pglines ) ifile.pglines = pglines ; -+ - if ( nxtoptind < argc ) { - ifnames = argv + nxtoptind ; - if ( argv [ argc ] ) { -@@ -308,9 +311,6 @@ int main( int argc, char **argv) - err = msg ( "E3 missing input file name" ) ; - } - -- if ( pfont ) ifile.font = pfont ; -- if ( pglines ) ifile.pglines = pglines ; -- - newIFILE ( &ovfile, ovfnames ) ; - - newOFILE ( &ofile, oformat, ofname, 0, 0, 0, 0 ) ; diff --git a/patches/efax-0.9/efax08a-time.patch b/patches/efax-0.9/efax08a-time.patch deleted file mode 100644 index c35c177..0000000 --- a/patches/efax-0.9/efax08a-time.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Robert Schwebel -Subject: [efax] add missing include file - -Signed-off-by: Robert Schwebel - ---- - efaxio.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/efaxio.c -+++ b/efaxio.c -@@ -2,6 +2,7 @@ - #include - #include - #include -+#include - - #include "efaxio.h" /* EFAX */ - #include "efaxmsg.h" diff --git a/patches/efax-0.9/series b/patches/efax-0.9/series deleted file mode 100644 index a47b124..0000000 --- a/patches/efax-0.9/series +++ /dev/null @@ -1,4 +0,0 @@ -efax-0.9-misc.patch -efax-0.9-nullptr.patch -efax-0.9-numlines.patch -efax08a-time.patch -- 1.7.7 -- ptxdist mailing list ptxdist@pengutronix.de