~ubuntu-branches/ubuntu/maverick/vice/maverick

« back to all changes in this revision

Viewing changes to src/fsdevice/fsdevice.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-02-01 11:30:26 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050201113026-3eyakzsmmheclvjg
Tags: 1.16-1
* New upstream version
* Fixes crash on 64-bit architectures (closes: #287640)
* x128 working again (closes: #286767)
* Works fine with /dev/dsp in use (not in the main changelog, but tested
  on my local machine as working).  Presumably, this also takes care of
  the issue with dsp being held.  I'm not sure if this is because I'm
  testing it on a 2.6 kernel now -- if you are still having problems
  with /dev/dsp, please reopen the bugs. (closes: #152952, #207942)
* Don't kill Makefile.in on clean

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
 
62
62
/* this should somehow go into the fs_info struct... */
63
63
 
64
 
static char fs_errorl[4][MAXPATHLEN];
 
64
static char fs_errorl[4][PATH_MAX];
65
65
static unsigned int fs_eptr[4];
66
66
static size_t fs_elen[4];
67
67
 
68
 
char fs_dirmask[MAXPATHLEN];
69
 
 
70
68
/* ------------------------------------------------------------------------- */
71
69
 
72
70
void fsdevice_set_directory(char *filename, unsigned int unit)
153
151
    if (!fs_elen[dnr])
154
152
        fsdevice_error(vdrive, CBMDOS_IPE_OK);
155
153
 
 
154
    *data = (BYTE)fs_errorl[dnr][fs_eptr[dnr]++];
 
155
    if (fs_eptr[dnr] >= fs_elen[dnr]) {
 
156
        fsdevice_error(vdrive, CBMDOS_IPE_OK);
 
157
        rc = SERIAL_EOF;
 
158
    }
 
159
 
 
160
#if 0
156
161
    if (fs_eptr[dnr] < fs_elen[dnr]) {
157
162
        *data = (BYTE)fs_errorl[dnr][fs_eptr[dnr]++];
158
163
        rc = SERIAL_OK;
161
166
        *data = 0xc7;
162
167
        rc = SERIAL_EOF;
163
168
    }
 
169
#endif
164
170
 
165
171
    return rc;
166
172
}
173
179
 
174
180
    if (machine_bus_device_attach(device, name, fsdevice_read, fsdevice_write,
175
181
                                  fsdevice_open, fsdevice_close,
176
 
                                  fsdevice_flush))
 
182
                                  fsdevice_flush, NULL))
177
183
        return 1;
178
184
 
179
185
    vdrive->image_format = VDRIVE_IMAGE_FORMAT_1541;