/*
- * $Id: headers.c,v 1.11 2008-08-14 19:57:52 didg Exp $
+ * $Id: headers.c,v 1.14 2009-10-29 13:38:15 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return ret;
}
-int ch_for( in, out )
- struct papfile *in, *out _U_;
+int ch_for( struct papfile *in, struct papfile *out _U_)
{
char *start, *cmt;
int linelength, crlflength;
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
cmt = get_text(start, linelength);
return( CH_DONE );
}
-int ch_title( in, out )
- struct papfile *in, *out _U_;
+int ch_title( struct papfile *in, struct papfile *out _U_)
{
char *start, *cmt;
int linelength, crlflength;
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
#ifdef DEBUG
- LOG(log_debug, logtype_papd, "Parsing %%Title");
+ LOG(log_debug9, logtype_papd, "Parsing %%Title");
#endif
cmt = get_text(start, linelength);
}
-int ch_creator( in, out )
- struct papfile *in, *out _U_;
+int ch_creator( struct papfile *in, struct papfile *out _U_)
{
char *start, *cmt;
int linelength, crlflength;
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
cmt = get_text(start, linelength);
return( CH_DONE );
}
-int ch_endcomm( in, out )
- struct papfile *in, *out _U_;
+int ch_endcomm( struct papfile *in, struct papfile *out _U_)
{
char *start;
int linelength, crlflength;
#ifdef DEBUG
- LOG(log_debug, logtype_papd, "End Comment");
+ LOG(log_debug9, logtype_papd, "End Comment");
#endif
in->pf_state |= PF_STW;
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
in->pf_state |= PF_TRANSLATE;
return ( CH_DONE);
}
-int ch_starttranslate(in,out)
- struct papfile *in, *out _U_;
+int ch_starttranslate( struct papfile *in, struct papfile *out _U_)
{
char *start;
int linelength, crlflength;
#ifdef DEBUG
- LOG(log_debug, logtype_papd, "Start translate");
+ LOG(log_debug9, logtype_papd, "Start translate");
#endif
switch ( markline( in, &start, &linelength, &crlflength )) {
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
in->pf_state |= PF_TRANSLATE;
return ( CH_DONE);
}
-int ch_endtranslate(in,out)
- struct papfile *in, *out _U_;
+int ch_endtranslate(struct papfile *in, struct papfile *out _U_)
{
char *start;
int linelength, crlflength;
#ifdef DEBUG
- LOG(log_debug, logtype_papd, "EndTranslate");
+ LOG(log_debug9, logtype_papd, "EndTranslate");
#endif
switch ( markline( in, &start, &linelength, &crlflength )) {
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
lp_write( in, start, linelength + crlflength );
return ( CH_DONE);
}
-int ch_translateone(in,out)
- struct papfile *in, *out _U_;
+int ch_translateone( struct papfile *in, struct papfile *out _U_)
{
char *start;
int linelength, crlflength;
#ifdef DEBUG
- LOG(log_debug, logtype_papd, "TranslateOne");
+ LOG(log_debug9, logtype_papd, "TranslateOne");
#endif
switch ( markline( in, &start, &linelength, &crlflength )) {
case -1 :
return( CH_MORE );
+
+ case -2 :
+ return( CH_ERROR );
}
in->pf_state |= PF_TRANSLATE;