Previous 15994 Revisions Next

r10445 Tuesday 15th February, 2011 at 10:39:13 UTC by Fabio Priuli
partial fix to the extrainfo issues (more work needed)
[src/mess]hashfile.c

src/mess/hashfile.c
r10444r10445
590590
591591const char *read_hash_config(device_image_interface &image, const char *sysname)
592592{
593    hash_file *hashfile = NULL;
594    const hash_info *info = NULL;
593   hash_file *hashfile = NULL;
594   const hash_info *info = NULL;
595595   char *temp = NULL;
596596   
597    /* open the hash file */
598    hashfile = hashfile_open(image.device().machine->options(), sysname, FALSE, NULL);
599    if (!hashfile)
600        goto done;
601
602    /* look up this entry in the hash file */
603    info = hashfile_lookup(hashfile, &image.hash());
604
605    if (!info)
606        goto done;
607
597   /* open the hash file */
598   hashfile = hashfile_open(image.device().machine->options(), sysname, FALSE, NULL);
599   if (!hashfile)
600      return NULL;
601   
602   /* look up this entry in the hash file */
603   info = hashfile_lookup(hashfile, &image.hash());
604   
605   if (!info)
606   {
607      hashfile_close(hashfile);
608      return NULL;
609   }
610   
608611   temp = core_strdup(info->extrainfo);
609    /* copy the relevant entries */
610    if (hashfile != NULL)
611        hashfile_close(hashfile);
612     
613    return temp  ? astring(temp).cstr() : (const char*)NULL;
614done:
615    if (hashfile != NULL)
616        hashfile_close(hashfile);
617    return NULL;
612   if (!temp)
613   {
614      hashfile_close(hashfile);
615      return NULL;
616   }
617   
618   astring result(temp);
619   
620   /* copy the relevant entries */
621   hashfile_close(hashfile);
622   
623   //printf("%s\n", result.cstr());   
624   return result.cstr();
618625}
626
619627const char *hashfile_extrainfo(device_image_interface &image)
620628{
621    const game_driver *drv;
622    const char *rc;   
629   const game_driver *drv;
630   const char *rc;   
623631
624632   /* now read the hash file */
625633   image.crc();

Previous 15994 Revisions Next


© 1998-2018 The MESS Team