[Cpri-develop] cpri/src drv_txt.c,1.4,1.5
Brought to you by:
chrisan,
rasmusmyklebust
|
From: <ch...@us...> - 2003-12-14 16:35:29
|
Update of /cvsroot/cpri/cpri/src
In directory sc8-pr-cvs1:/tmp/cvs-serv32447
Modified Files:
drv_txt.c
Log Message:
Competed bugfix #841105
Index: drv_txt.c
===================================================================
RCS file: /cvsroot/cpri/cpri/src/drv_txt.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** drv_txt.c 13 Nov 2003 00:42:15 -0000 1.4
--- drv_txt.c 14 Dec 2003 16:35:25 -0000 1.5
***************
*** 20,24 ****
#define AddCr(s, cr) *s++ = '\n';if (cr) *s++ = cr
#define DST_PRINTER 0
! #define DST_FILE 1
typedef struct t_driver {
t_printerq *q;
--- 20,24 ----
#define AddCr(s, cr) *s++ = '\n';if (cr) *s++ = cr
#define DST_PRINTER 0
! #define DST_FILE 1
typedef struct t_driver {
t_printerq *q;
***************
*** 163,167 ****
{
t_driver *dd;
!
dd = GetMem0(t_driver, 1);
dd->buf = GetMem0(char, 1000);
--- 163,167 ----
{
t_driver *dd;
!
dd = GetMem0(t_driver, 1);
dd->buf = GetMem0(char, 1000);
***************
*** 351,356 ****
break;
case EPC_NEW_PAGE:
! if(dest=DST_PRINTER)
! *dd->p++ = '\14';
if (cr)
*dd->p++ = cr;
--- 351,356 ----
break;
case EPC_NEW_PAGE:
! if(dest==DST_PRINTER)
! *dd->p++ = '\14';
if (cr)
*dd->p++ = cr;
***************
*** 458,462 ****
break;
case EPC_CASSETTE_FEED:
! case EPC_MANUAL_FEED:
case EPC_END_TABLE:
case EPC_BEGIN_TO_BE_REPEATED:
--- 458,462 ----
break;
case EPC_CASSETTE_FEED:
! case EPC_MANUAL_FEED:
case EPC_END_TABLE:
case EPC_BEGIN_TO_BE_REPEATED:
***************
*** 466,470 ****
case EPC_END_HTML_TAG:
case EPC_END_START_SEQUENCE:
! case EPC_END_BAR_LABEL:
case EPC_PUSH_POS:
case EPC_POP_POS:
--- 466,470 ----
case EPC_END_HTML_TAG:
case EPC_END_START_SEQUENCE:
! case EPC_END_BAR_LABEL:
case EPC_PUSH_POS:
case EPC_POP_POS:
***************
*** 490,499 ****
default:
if(c>=32&&dest==DST_FILE)
! {
! if (dd->dos)
! c = _CpriToDOS(c, dd->dos);
! dd->n++;
! *dd->p++ = c;
! }
break;
}
--- 490,499 ----
default:
if(c>=32&&dest==DST_FILE)
! {
! if (dd->dos)
! c = _CpriToDOS(c, dd->dos);
! dd->n++;
! *dd->p++ = c;
! }
break;
}
***************
*** 523,527 ****
fn = _CpriGetDestinationFilename(dd->q);
!
dst = fopen(fn, "w");
if (dst) {
--- 523,527 ----
fn = _CpriGetDestinationFilename(dd->q);
!
dst = fopen(fn, "w");
if (dst) {
***************
*** 531,535 ****
} while (!dd->eof);
dd->eof=0;
! fclose(dst);
}
return EOF;
--- 531,535 ----
} while (!dd->eof);
dd->eof=0;
! fclose(dst);
}
return EOF;
***************
*** 541,543 ****
t_cpri_vtable textfile_vtable = {TextInit, TextClose, TextFileDriver};
t_cpri_vtable *_cpri_text_vtable = &textfile_vtable;
-
--- 541,542 ----
|