~ubuntu-branches/ubuntu/utopic/vice/utopic-proposed

« back to all changes in this revision

Viewing changes to src/machine-bus.c

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2014-05-10 21:08:23 UTC
  • mfrom: (17.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140510210823-v5aojvy1pv1sg132
Tags: 2.4.dfsg+2.4.6-1ubuntu1
Use autotools-dev to update config.{sub,guess} for new arches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        p->getf = (int (*)(struct vdrive_s *, BYTE *, unsigned int))fn;
62
62
        p->putf = (int (*)(struct vdrive_s *, BYTE, unsigned int))fn;
63
63
        p->openf = (int (*)(struct vdrive_s *, const BYTE *, unsigned int,
64
 
                   unsigned int, struct cbmdos_cmd_parse_s *))fn;
 
64
                            unsigned int, struct cbmdos_cmd_parse_s *))fn;
65
65
        p->closef = (int (*)(struct vdrive_s *, unsigned int))fn;
66
66
        p->flushf = (void (*)(struct vdrive_s *, unsigned int))NULL;
67
67
        p->listenf = (void (*)(struct vdrive_s *, unsigned int))NULL;
71
71
}
72
72
 
73
73
int machine_bus_device_attach(unsigned int unit, const char *name,
74
 
                              int (*getf)(struct vdrive_s *, BYTE *,
75
 
                              unsigned int),
76
 
                              int (*putf)(struct vdrive_s *, BYTE,
77
 
                              unsigned int),
 
74
                              int (*getf)(struct vdrive_s *, BYTE *, unsigned int),
 
75
                              int (*putf)(struct vdrive_s *, BYTE, unsigned int),
78
76
                              int (*openf)(struct vdrive_s *, const BYTE *,
79
 
                              unsigned int, unsigned int,
80
 
                              struct cbmdos_cmd_parse_s *),
 
77
                                           unsigned int, unsigned int,
 
78
                                           struct cbmdos_cmd_parse_s *),
81
79
                              int (*closef)(struct vdrive_s *, unsigned int),
82
80
                              void (*flushf)(struct vdrive_s *, unsigned int),
83
81
                              void (*listenf)(struct vdrive_s *, unsigned int))
85
83
    serial_t *p;
86
84
    int i;
87
85
 
88
 
    if (unit >= SERIAL_MAXDEVICES)
 
86
    if (unit >= SERIAL_MAXDEVICES) {
89
87
        return 1;
 
88
    }
90
89
 
91
90
    p = serial_device_get(unit);
92
91
 
141
140
        p->getf = (int (*)(struct vdrive_s *, BYTE *, unsigned int))fn;
142
141
        p->putf = (int (*)(struct vdrive_s *, BYTE, unsigned int))fn;
143
142
        p->openf = (int (*)(struct vdrive_s *, const BYTE *, unsigned int,
144
 
                   unsigned int, struct cbmdos_cmd_parse_s *))fn;
 
143
                            unsigned int, struct cbmdos_cmd_parse_s *))fn;
145
144
        p->closef = (int (*)(struct vdrive_s *, unsigned int))fn;
146
145
        p->flushf = (void (*)(struct vdrive_s *, unsigned int))NULL;
147
146
        p->listenf = (void (*)(struct vdrive_s *, unsigned int))NULL;
149
148
 
150
149
    return 0;
151
150
}
152