~ubuntu-branches/ubuntu/quantal/vice/quantal

« back to all changes in this revision

Viewing changes to src/drive/drive-resources.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2010-02-11 18:30:16 UTC
  • mfrom: (1.1.8 upstream) (9.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100211183016-f6n8usn3tzp0u6dp
Tags: 2.2.dfsg-1
* New upstream release, C64 DTV is included so update package description
  and add it to the menu.
* Drop patch fixing build failure with gcc-4.4 , applied upstream.
* Fix some lintian problems and clean up debian/rules .

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
      case DRIVE_EXTEND_NEVER:
89
89
      case DRIVE_EXTEND_ASK:
90
90
      case DRIVE_EXTEND_ACCESS:
91
 
        drive_context[(int)param]->drive->extend_image_policy = val;
 
91
        drive_context[vice_ptr_to_int(param)]->drive->extend_image_policy = val;
92
92
        return 0;
93
93
      default:
94
94
        return -1;
175
175
    int busses;
176
176
    drive_t *drive, *drive0;
177
177
 
178
 
    dnr = (unsigned int)param;
 
178
    dnr = vice_ptr_to_uint(param);
179
179
    drive = drive_context[dnr]->drive;
180
180
    drive0 = drive_context[0]->drive;
181
181
 
248
248
 
249
249
static int drive_resources_type(int val, void *param)
250
250
{
251
 
    switch ((unsigned int)param) {
 
251
    switch (vice_ptr_to_uint(param)) {
252
252
      case 0:
253
253
        return drive0_resources_type(val, param);
254
254
      case 1:
283
283
        res_drive_type[0].name = lib_msprintf("Drive%iType", dnr + 8);
284
284
        res_drive_type[0].factory_value = (int)type;
285
285
        res_drive_type[0].value_ptr = (int *)&(drive->type);
286
 
        res_drive_type[0].param = (void *)dnr;
 
286
        res_drive_type[0].param = uint_to_void_ptr(dnr);
287
287
 
288
288
        if (resources_register_int(res_drive_type) < 0)
289
289
            return -1;
317
317
 
318
318
        res_drive[0].name = lib_msprintf("Drive%iExtendImagePolicy", dnr + 8);
319
319
        res_drive[0].value_ptr = (int *)&(drive->extend_image_policy);
320
 
        res_drive[0].param = (void *)dnr;
 
320
        res_drive[0].param = uint_to_void_ptr(dnr);
321
321
 
322
322
        if (resources_register_int(res_drive) < 0)
323
323
            return -1;