Subversion Repositories svn1-original

Rev

Rev 240 | Rev 334 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 240 Rev 263
Line 17... Line 17...
17
 * revision date        by      reason
17
 * revision date        by      reason
18
 *  00.0    27/01/95    DDP     Tidies up the program and formatted the file
18
 *  00.0    27/01/95    DDP     Tidies up the program and formatted the file
19
 *
19
 *
20
 **************************************************************************/
20
 **************************************************************************/
21
#include <QString>
21
#include <QString>
-
 
22
#include  <QDir>
22
#include    <stdio.h>
23
#include    <stdio.h>
23
#include    <time.h>
24
#include    <time.h>
24
#include    <stdarg.h>
25
#include    <stdarg.h>
25
#include    "mainwindow.h"
26
#include    "mainwindow.h"
26
 
27
 
-
 
28
 
27
#include    "consts.h"
29
#include    "consts.h"
28
#include    "structs.h"
30
#include    "structs.h"
29
#include    "proto.h"
31
#include    "proto.h"
30
 
32
 
31
FILE       *pfile;                               /* Fd of the printer channel */
33
FILE       *pfile;                               /* Fd of the printer channel */
Line 102... Line 104...
102
 *
104
 *
103
 *
105
 *
104
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
106
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
105
----------------------------------------------------------------------------*/
107
----------------------------------------------------------------------------*/
106
 
108
 
107
bool open_printer_name( const char *pname, int width, report_type html, const char *title )
109
bool open_printer_name( const char *pname, int width, report_type htmltype, const char *title )
108
{
110
{
109
    printFileName = filepath;
111
    printFileName = filepath;
-
 
112
    switch (htmltype)
-
 
113
    {
-
 
114
    case printed: printFileName.append("webtxt/");  break;
-
 
115
    case html: printFileName.append("web/");  break;
-
 
116
    default: printFileName.append("text/");  break;
-
 
117
    }
-
 
118
 
-
 
119
    /*
-
 
120
    ** Ensure that the directory exists
-
 
121
    */
-
 
122
    {
-
 
123
        QDir dir(filepath);
-
 
124
        dir.mkpath(printFileName);
-
 
125
    }
-
 
126
 
-
 
127
    /*
-
 
128
    ** Append the filename to the directory
-
 
129
    */
110
    printFileName.append(pname);
130
    printFileName.append(pname);
111
 
131
 
112
    print_width = width ? width : 80;
132
    print_width = width ? width : 80;
113
    print_col = 0;
133
    print_col = 0;
114
    print_line = 0;
134
    print_line = 0;
Line 125... Line 145...
125
        time( &pri_time );                       /* Latch the time */
145
        time( &pri_time );                       /* Latch the time */
126
 
146
 
127
        /*
147
        /*
128
        **  Print out the HTML file header
148
        **  Print out the HTML file header
129
        */
149
        */
130
        if ( html )
150
        if ( htmltype )
131
        {
151
        {
132
            print( "<HTML>\n" );
152
            print( "<HTML>\n" );
133
            print( "<HEAD>\n" );
153
            print( "<HEAD>\n" );
134
            print( "<TITLE>%s - %s</TITLE>\n", config.event_name, title );
154
            print( "<TITLE>%s - %s</TITLE>\n", config.event_name, title );
135
//            print( "<LINK rel=\"stylesheet\" href=\"brmr.css\" type=\"text/css\">\n");
155
//            print( "<LINK rel=\"stylesheet\" href=\"brmr.css\" type=\"text/css\">\n");