Subversion Repositories svn1-original

Rev

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

Rev 51 Rev 54
Line 59... Line 59...
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, bool html, char *title )
61
{
61
{
62
    char    *pname;
62
    char    *pname;
63
 
63
 
-
 
64
#if defined(fred)
64
    /*
65
    /*
65
    **  Determine the name of the file
66
    **  Determine the name of the file
66
    **  May need to modify the extension if it is an HTML file
67
    **  May need to modify the extension if it is an HTML file
67
    */
68
    */
68
    if ( html )
69
    if ( html )
Line 71... Line 72...
71
    }
72
    }
72
    else
73
    else
73
    {
74
    {
74
        pname = p_filename( name[0] ? name : filebase, "", ext[0] ? ext : "lst" );
75
        pname = p_filename( name[0] ? name : filebase, "", ext[0] ? ext : "lst" );
75
    }
76
    }
-
 
77
#else
-
 
78
    /*
-
 
79
    **  Determine the name of the file
-
 
80
    **  May need to modify the extension if it is an HTML file
-
 
81
    */
-
 
82
    if ( html )
-
 
83
    {
-
 
84
        pname = p_filename( name[0] ? name : filebase, ext ,"html" );
-
 
85
    }
-
 
86
    else
-
 
87
    {
-
 
88
        pname = p_filename( filebase, name[0] ? name : "", ext[0] ? ext : "lst" );
-
 
89
    }
-
 
90
#endif
-
 
91
 
-
 
92
    /*
-
 
93
    **  Now use basic function
-
 
94
    */
-
 
95
    return open_printer_name (pname, width, html, title );
-
 
96
}
76
 
97
 
-
 
98
/*----------------------------------------------------------------------------
-
 
99
 * FUNCTION           : open_printer_name
-
 
100
 *
-
 
101
 * DESCRIPTION        : Open a printer with a known name
-
 
102
 *
-
 
103
 *      This function is called to open the printer and prepare to print
-
 
104
 *
-
 
105
 *  Parameters:
-
 
106
 *      pname       Name of print file
-
 
107
 *      width       Width of the printed file
-
 
108
 *      html        Printing in HTML mode
-
 
109
 *
-
 
110
 *  Returns:
-
 
111
 *      TRUE if the printer can be attached
-
 
112
 *
-
 
113
 *
-
 
114
 *  Note: Use an "htm" file extension as DOS cannot handle 4 letter extensions
-
 
115
----------------------------------------------------------------------------*/
-
 
116
 
-
 
117
bool open_printer_name( char *pname, int width, bool html, char *title )
-
 
118
{
77
    print_width = width ? width : 80;
119
    print_width = width ? width : 80;
78
    print_col = 0;
120
    print_col = 0;
79
    print_line = 0;
121
    print_line = 0;
80
    print_underline_start = -1;
122
    print_underline_start = -1;
81
    print_underline_end = -1;
123
    print_underline_end = -1;