Пример #1
0
int
main(int argc, char *argv[])
{
    char filename[20] = "STRIPCD";

    printf("Xenogears Main Disk Dumper v0.9.67\n  Created by Graph and _Ombra_\n\n");

    if (argc != 2)
    {
        printf("USAGE:'extract.exe isofile' extract files from xeno cd image.\n");
        return EXIT_FAILURE;
    }

    if ((infile = fopen(argv[1], "rb")) == NULL)
    {
        printf("The file %s does not exist, Please check the file name.\n", argv[1]);
        return EXIT_FAILURE;
    }

    cd = verify_iso();
    if (cd == 0)
    {
        return EXIT_FAILURE;
    }
    else if (cd == 1)
    {
        strcat(filename, "1\\");
    }
    else if (cd == 2)
    {
        strcat(filename, "2\\");
    }

    // TODO FIX ME
    //mkdir(filename);
    abort();

    extract(filename);
    fclose(infile);
    return EXIT_SUCCESS;
}
Пример #2
0
static gboolean
update_source (NcbSelection *selection)
{
        char      *name = NULL;
        guint64    size;
        gboolean   res;
        gboolean   is_copy;
        GError    *error;

        is_copy = FALSE;

        error = NULL;

        switch (selection->priv->source_type) {
        case NCB_SELECTION_SOURCE_BURN_FOLDER:
                res = verify_burn_folder (selection, &name, &size, &error);
                break;
        case NCB_SELECTION_SOURCE_DEVICE:
                res = verify_device (selection, &name, &size, &error);
                is_copy = TRUE;
                break;
        case NCB_SELECTION_SOURCE_CUE:
                res = verify_cue (selection, &name, &size, &error);
                break;
        case NCB_SELECTION_SOURCE_ISO:
                res = verify_iso (selection, &name, &size, &error);
                break;
        default:
                g_assert_not_reached ();
                break;
        }

        if (! res) {
                goto fail;
        }

        ncb_selection_set_size (selection, size);
        if (name == NULL) {
                name = create_default_label ();
        }
        ncb_selection_set_label (selection, name);

        g_free (name);

        selection->priv->update_source_idle_id = 0;

        return FALSE;

 fail:
        g_free (name);

        selection->priv->update_source_idle_id = 0;

        if (error != NULL) {
                ncb_hig_show_error_dialog (_("Unable to create CD/DVD"), error->message, NULL);
                g_error_free (error);
        }

        gtk_main_quit ();

        return FALSE;
}