home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume16
/
mfold
/
patch01
/
patch.mfold.c
next >
Wrap
Text File
|
1991-02-15
|
3KB
|
103 lines
*** ../mfold.c Sat Feb 9 00:56:05 1991
--- mfold.c Sat Feb 9 00:59:57 1991
***************
*** 13,18 ****
--- 13,21 ----
putcolu(insert[doo]);\
}
#define BOT_LINES 1
+ #define STR 15
+ #define TEST_STR 25
+ #define GET_NUM_STR 25
int colu_chars, colu_lines;
int page_len = PAGE_LEN, columns = 1, lin = 0, bot_lines = BOT_LINES;
***************
*** 43,54 ****
for ( index = 1; index < argc; index++) {
if ( argv[index][0] != '-' ) {
if ( index == 1 || (argv[index - 1][0] == '-' &&
! argv[index - 1][1] != 'i' && argv[index - 1][1] != 'D' || index > 2
&& argv[index - 2][0] == '-' && (argv[index - 2][1] == 'i'
|| argv[index - 2][1] == 'D')) && !got_file ) {
got_file = TRUE;
index_file = index;
! } else if ( index_insert != index && index_delim != index ) {
fprintf(stderr, "Option '%s' not allowed.\n", argv[index]);
usage(11);
}
--- 46,57 ----
for ( index = 1; index < argc; index++) {
if ( argv[index][0] != '-' ) {
if ( index == 1 || (argv[index - 1][0] == '-' &&
! argv[index - 1][0] != 'i' && argv[index - 1][0] != 'D' || index > 2
&& argv[index - 2][0] == '-' && (argv[index - 2][1] == 'i'
|| argv[index - 2][1] == 'D')) && !got_file ) {
got_file = TRUE;
index_file = index;
! } else {
fprintf(stderr, "Option '%s' not allowed.\n", argv[index]);
usage(11);
}
***************
*** 55,61 ****
}
doo = index_insert != index && index_delim != index
&& index_file != index;
! if ( argv[index][0] == '-' ) switch ( argv[index][1] ) {
case 'i':
check_it(&got_insert, "-i", 8, doo, &index_insert, index + 1);
break;
--- 58,64 ----
}
doo = index_insert != index && index_delim != index
&& index_file != index;
! switch ( argv[index][1] ) {
case 'i':
check_it(&got_insert, "-i", 8, doo, &index_insert, index + 1);
break;
***************
*** 75,81 ****
check_it(&got_mrandom, "-r", 37, doo, &index_mrandom, index);
break;
case 'd':
! check_it(&got_dyslexi, "-d", 55, doo, &dummy, index);
break;
case 't':
check_it(&got_tab_len, "-t", 13, doo, &index_tab_len, index);
--- 78,84 ----
check_it(&got_mrandom, "-r", 37, doo, &index_mrandom, index);
break;
case 'd':
! check_it(&got_dyslexi, "-d", 11, doo, &dummy, index);
break;
case 't':
check_it(&got_tab_len, "-t", 13, doo, &index_tab_len, index);
***************
*** 457,472 ****
putcolu(c)
char c;
{
- int i;
-
if ( c == '\n' || col == colu_chars ) {
! if ( c == '\n' && str_len(cur_page[lin]) == ins_len ) {
! for ( i = 0; i < ins_len; i++ ) {
! cur_page[lin][i] = '\0';
! }
! col = 0;
! }
! if ( col ) advance_line();
return;
}
cur_page[lin][col++] = c;
--- 460,467 ----
putcolu(c)
char c;
{
if ( c == '\n' || col == colu_chars ) {
! advance_line();
return;
}
cur_page[lin][col++] = c;