Patch for mfold(1) version 1.04, to get 1.05

Peter Smidt smidt at fy.chalmers.se
Mon Feb 11 23:39:12 AEST 1991


A serious but small bug have been fixed. When mfold gets the '-n'
flag, mfold 1.04 will delete lines under certain circumstances.
Here is a patch to get mfold 1.05 .

(The program mfold(1) folds text and makes columns.)

Mvh   Peter Smidt

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  patch.README patch.mfold.c
# Wrapped by smidt at coco on Sat Feb  9 01:08:06 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patch.README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patch.README'\"
else
echo shar: Extracting \"'patch.README'\" \(465 characters\)
sed "s/^X//" >'patch.README' <<'END_OF_FILE'
X*** ../README	Sat Feb  9 01:01:03 1991
X--- README	Sat Feb  9 00:59:47 1991
X***************
X*** 1,4 ****
X! Version 1.05, last change 9 february 1991.
X  
X  The program mfold is a simple folding and column making program.
X  unpack the files from the shar file put them in a empty
X--- 1,4 ----
X! Version 1.04, last change 30 september 1990.
X  
X  The program mfold is a simple folding and column making program.
X  unpack the files from the shar file put them in a empty
END_OF_FILE
if test 465 -ne `wc -c <'patch.README'`; then
    echo shar: \"'patch.README'\" unpacked with wrong size!
fi
# end of 'patch.README'
fi
if test -f 'patch.mfold.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patch.mfold.c'\"
else
echo shar: Extracting \"'patch.mfold.c'\" \(2971 characters\)
sed "s/^X//" >'patch.mfold.c' <<'END_OF_FILE'
X*** ../mfold.c	Sat Feb  9 00:56:05 1991
X--- mfold.c	Sat Feb  9 00:59:57 1991
X***************
X*** 13,18 ****
X--- 13,21 ----
X  		putcolu(insert[doo]);\
X  	}
X  #define BOT_LINES		1
X+ #define STR				15
X+ #define TEST_STR		25
X+ #define GET_NUM_STR		25
X  
X  int colu_chars, colu_lines;
X  int page_len = PAGE_LEN, columns = 1, lin = 0, bot_lines = BOT_LINES;
X***************
X*** 43,54 ****
X  	for ( index = 1; index < argc; index++) {
X  		if ( argv[index][0] != '-' ) {
X  			if ( index == 1 || (argv[index - 1][0] == '-' &&
X! 			argv[index - 1][1] != 'i' && argv[index - 1][1] != 'D' || index > 2
X  			&& argv[index - 2][0] == '-' && (argv[index - 2][1] == 'i'
X  			|| argv[index - 2][1] == 'D')) && !got_file ) {
X  				got_file = TRUE;
X  				index_file = index;
X! 			} else if ( index_insert != index && index_delim != index ) {
X  				fprintf(stderr, "Option '%s' not allowed.\n", argv[index]);
X  				usage(11);
X  			}
X--- 46,57 ----
X  	for ( index = 1; index < argc; index++) {
X  		if ( argv[index][0] != '-' ) {
X  			if ( index == 1 || (argv[index - 1][0] == '-' &&
X! 			argv[index - 1][0] != 'i' && argv[index - 1][0] != 'D' || index > 2
X  			&& argv[index - 2][0] == '-' && (argv[index - 2][1] == 'i'
X  			|| argv[index - 2][1] == 'D')) && !got_file ) {
X  				got_file = TRUE;
X  				index_file = index;
X! 			} else {
X  				fprintf(stderr, "Option '%s' not allowed.\n", argv[index]);
X  				usage(11);
X  			}
X***************
X*** 55,61 ****
X  		}
X  		doo = index_insert != index && index_delim != index
X  		&& index_file != index;
X! 		if ( argv[index][0] == '-' ) switch ( argv[index][1] ) {
X  			case 'i':
X  				check_it(&got_insert, "-i", 8, doo, &index_insert, index + 1);
X  				break;
X--- 58,64 ----
X  		}
X  		doo = index_insert != index && index_delim != index
X  		&& index_file != index;
X! 		switch ( argv[index][1] ) {
X  			case 'i':
X  				check_it(&got_insert, "-i", 8, doo, &index_insert, index + 1);
X  				break;
X***************
X*** 75,81 ****
X  				check_it(&got_mrandom, "-r", 37, doo, &index_mrandom, index);
X  				break;
X  			case 'd':
X! 				check_it(&got_dyslexi, "-d", 55, doo, &dummy, index);
X  				break;
X  			case 't':
X  				check_it(&got_tab_len, "-t", 13, doo, &index_tab_len, index);
X--- 78,84 ----
X  				check_it(&got_mrandom, "-r", 37, doo, &index_mrandom, index);
X  				break;
X  			case 'd':
X! 				check_it(&got_dyslexi, "-d", 11, doo, &dummy, index);
X  				break;
X  			case 't':
X  				check_it(&got_tab_len, "-t", 13, doo, &index_tab_len, index);
X***************
X*** 457,472 ****
X  putcolu(c)
X  char c;
X  {
X- 	int i;
X- 
X  	if ( c == '\n' || col == colu_chars ) {
X! 		if ( c == '\n' && str_len(cur_page[lin]) == ins_len ) {
X! 			for ( i = 0; i < ins_len; i++ ) {
X! 				cur_page[lin][i] = '\0';
X! 			}
X! 			col = 0;
X! 		}
X! 		if ( col ) advance_line();
X  		return;
X  	}
X  	cur_page[lin][col++] = c;
X--- 460,467 ----
X  putcolu(c)
X  char c;
X  {
X  	if ( c == '\n' || col == colu_chars ) {
X! 		advance_line();
X  		return;
X  	}
X  	cur_page[lin][col++] = c;
END_OF_FILE
if test 2971 -ne `wc -c <'patch.mfold.c'`; then
    echo shar: \"'patch.mfold.c'\" unpacked with wrong size!
fi
# end of 'patch.mfold.c'
fi
echo shar: End of shell archive.
exit 0
-- 
+=======================================+
"The whole valley is like a smorgasbord."
					-- TREMORS



More information about the Alt.sources.patches mailing list