Subversion Repositories svn1-original

Rev

Rev 72 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72 Rev 79
Line 28... Line 28...
28
#include    "proto.h"
28
#include    "proto.h"
29
 
29
 
30
FILE       *pfile;                               /* Fd of the printer channel */
30
FILE       *pfile;                               /* Fd of the printer channel */
31
long        pri_time;                            /* Time printer is opened - for banners */
31
long        pri_time;                            /* Time printer is opened - for banners */
32
int         print_width;                         /* Width of the printout */
32
int         print_width;                         /* Width of the printout */
33
int         print_html = 0;                      /* Printing with HTML */
33
report_type print_html = text;                   /* Printing with HTML */
34
int         print_col = 0;                       /* Current print column */
34
int         print_col = 0;                       /* Current print column */
35
int         print_line = 0;                      /* Current print line */
35
int         print_line = 0;                      /* Current print line */
36
int         print_underline_start;               /* Start of underline */
36
int         print_underline_start;               /* Start of underline */
37
int         print_underline_end;                 /* End of underline */
37
int         print_underline_end;                 /* End of underline */
38
long        print_current_colour;                /* Current printing colour */
38
long        print_current_colour;                /* Current printing colour */
Line 55... Line 55...
55
 *
55
 *
56
 *
56
 *
57
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
57
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
58
 *========================================================================*/
58
 *========================================================================*/
59
 
59
 
60
bool open_printer( char *name, char *ext, int width, bool html, char *title )
60
bool open_printer( char *name, char *ext, int width, report_type html, char *title )
61
{
61
{
62
    char    *pname;
62
    char    *pname;
63
 
63
 
64
    /*
64
    /*
65
    **  Determine the name of the file
65
    **  Determine the name of the file
66
    **  May need to modify the extension if it is an HTML file
66
    **  May need to modify the extension if it is an HTML file
67
    */
67
    */
68
    if ( html )
68
    if ( html )
69
    {
69
    {
-
 
70
        if ( html == printed )
-
 
71
            pname = p_filename( name[0] ? name : filebase, ext ,"prn.html" );
-
 
72
        else
70
        pname = p_filename( name[0] ? name : filebase, ext ,"html" );
73
            pname = p_filename( name[0] ? name : filebase, ext ,"html" );
71
    }
74
    }
72
    else
75
    else
73
    {
76
    {
74
        pname = p_filename( filebase, name[0] ? name : "", ext[0] ? ext : "lst" );
77
        pname = p_filename( filebase, name[0] ? name : "", ext[0] ? ext : "lst" );
75
    }
78
    }
Line 97... Line 100...
97
 *
100
 *
98
 *
101
 *
99
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
102
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
100
----------------------------------------------------------------------------*/
103
----------------------------------------------------------------------------*/
101
 
104
 
102
bool open_printer_name( char *pname, int width, bool html, char *title )
105
bool open_printer_name( char *pname, int width, report_type html, char *title )
103
{
106
{
104
    print_width = width ? width : 80;
107
    print_width = width ? width : 80;
105
    print_col = 0;
108
    print_col = 0;
106
    print_line = 0;
109
    print_line = 0;
107
    print_underline_start = -1;
110
    print_underline_start = -1;
Line 126... Line 129...
126
            print( "<TITLE>%s - %s</TITLE>\n", config.event_name, title );
129
            print( "<TITLE>%s - %s</TITLE>\n", config.event_name, title );
127
//            print( "<LINK rel=\"stylesheet\" href=\"brmr.css\" type=\"text/css\">\n");
130
//            print( "<LINK rel=\"stylesheet\" href=\"brmr.css\" type=\"text/css\">\n");
128
            print( "</HEAD>\n" );
131
            print( "</HEAD>\n" );
129
            print( "<BODY LANG=\"en-US\">\n" );
132
            print( "<BODY LANG=\"en-US\">\n" );
130
            print( "<PRE>" );
133
            print( "<PRE>" );
131
            print_html = TRUE;
134
            print_html = html;
132
        }
135
        }
133
 
136
 
134
        /*
137
        /*
135
        **  Print out a common banner
138
        **  Print out a common banner
136
        */
139
        */
Line 164... Line 167...
164
 
167
 
165
bool close_printer(void)
168
bool close_printer(void)
166
{
169
{
167
    if ( print_html )
170
    if ( print_html )
168
    {
171
    {
169
        print_html = FALSE;
172
        print_html = text;
170
        print( "</PRE>\n" );
173
        print( "</PRE>\n" );
171
        print( "</BODY>\n" );
174
        print( "</BODY>\n" );
172
        print( "</HTML>\n" );
175
        print( "</HTML>\n" );
173
    }
176
    }
174
    else
177
    else
Line 537... Line 540...
537
 
540
 
538
    l = strlen( config.event_name );
541
    l = strlen( config.event_name );
539
    s = ( print_width - l ) / 2;
542
    s = ( print_width - l ) / 2;
540
    print( "%*s", s, "" );
543
    print( "%*s", s, "" );
541
 
544
 
542
    if ( print_html )
545
    if ( print_html == html )
543
        print( "<A HREF=\"%s\">", p_filename(filebase, "index" ,"html"));
546
        print( "<A HREF=\"%s\">", p_filename(filebase, "index" ,"html"));
544
    print_underline( TRUE);
547
    print_underline( TRUE);
545
    print_bold( TRUE );
548
    print_bold( TRUE );
546
 
549
 
547
    print( "%s", config.event_name );
550
    print( "%s", config.event_name );
548
 
551
 
549
    print_bold( FALSE );
552
    print_bold( FALSE );
550
    print_underline( FALSE );
553
    print_underline( FALSE );
551
    if ( print_html )
554
    if ( print_html == html )
552
        print( "</A>" );
555
        print( "</A>" );
553
 
556
 
554
    print( "\n" );
557
    print( "\n" );
555
 
558
 
556
    /*
559
    /*