~ubuntu-branches/ubuntu/dapper/vice/dapper

« back to all changes in this revision

Viewing changes to src/printerdrv/drv-ascii.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2004-08-26 13:35:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040826133551-gcje8j31q5cqgdq2
Tags: 1.14-3
Apply patch from Spiro Trikaliotis <vice@trikaliotis.net> to fix a
problem that some users were experiencing with a floating point
exception on startup related to the fullscreen option being enabled
during compile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * drv-ascii.c - ASCII printer driver.
3
3
 *
4
4
 * Written by
5
 
 *  Andreas Boose <boose@linux.rz.fh-hannover.de>
 
5
 *  Andreas Boose <viceteam@t-online.de>
6
6
 *
7
7
 * This file is part of VICE, the Versatile Commodore Emulator.
8
8
 * See README for copyright notice.
28
28
 
29
29
#include "driver-select.h"
30
30
#include "drv-ascii.h"
 
31
#include "log.h"
31
32
#include "output-select.h"
32
33
#include "output.h"
33
34
#include "types.h"
34
35
 
 
36
 
 
37
/* #define DEBUG_PRINTER */
 
38
 
 
39
static log_t drv_ascii_log = LOG_ERR;
 
40
 
35
41
static int drv_ascii_open(unsigned int prnr, unsigned int secondary)
36
42
{
37
43
    output_parameter_t output_parameter;
49
55
 
50
56
static int drv_ascii_putc(unsigned int prnr, unsigned int secondary, BYTE b)
51
57
{
 
58
#ifdef DEBUG_PRINTER
 
59
    log_message(drv_ascii_log, "Print device #%i secondary %i data %02x.",
 
60
                prnr + 4, secondary, b);
 
61
#endif
 
62
 
52
63
    if (output_select_putc(prnr, b) < 0)
53
64
        return -1;
54
65
 
69
80
    return output_select_flush(prnr);
70
81
}
71
82
 
 
83
static int drv_ascii_formfeed(unsigned int prnr)
 
84
{
 
85
    return 0;
 
86
}
 
87
 
72
88
int drv_ascii_init_resources(void)
73
89
{
74
90
    driver_select_t driver_select;
79
95
    driver_select.drv_putc = drv_ascii_putc;
80
96
    driver_select.drv_getc = drv_ascii_getc;
81
97
    driver_select.drv_flush = drv_ascii_flush;
 
98
    driver_select.drv_formfeed = drv_ascii_formfeed;
82
99
 
83
100
    driver_select_register(&driver_select);
84
101
 
87
104
 
88
105
void drv_ascii_init(void)
89
106
{
90
 
 
 
107
    drv_ascii_log = log_open("Drv-Ascii");
91
108
}
92
109