Subversion Repositories eduke32

Rev

Rev 6163 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6163 Rev 7138
Line 32... Line 32...
32
#endif
32
#endif
33
33
34
#include "format.h"
34
#include "format.h"
35
#include "list.h"
35
#include "list.h"
36
#include "hio.h"
36
#include "hio.h"
-
 
37
#ifndef LIBXMP_CORE_PLAYER
37
#include "tempfile.h"
38
#include "tempfile.h"
-
 
39
#endif
38
40
39
#ifndef LIBXMP_CORE_PLAYER
41
#ifndef LIBXMP_CORE_PLAYER
40
#if !defined(HAVE_POPEN) && defined(WIN32)
42
#if !defined(HAVE_POPEN) && defined(WIN32)
41
#include "win32/ptpopen.h"
43
#include "win32/ptpopen.h"
42
#define HAVE_POPEN 1
44
#define HAVE_POPEN 1
Line 280... Line 282...
280
282
281
        return basename;
283
        return basename;
282
}
284
}
283
#endif /* LIBXMP_CORE_PLAYER */
285
#endif /* LIBXMP_CORE_PLAYER */
284
286
-
 
287
#ifdef EDUKE32_DISABLED
285
int xmp_test_module(char *path, struct xmp_test_info *info)
288
int xmp_test_module(char *path, struct xmp_test_info *info)
286
{
289
{
287
        HIO_HANDLE *h;
290
        HIO_HANDLE *h;
288
        struct stat st;
291
        struct stat st;
289
        char buf[XMP_NAME_SIZE];
292
        char buf[XMP_NAME_SIZE];
Line 359... Line 362...
359
#else
362
#else
360
        hio_close(h);
363
        hio_close(h);
361
#endif
364
#endif
362
        return ret;
365
        return ret;
363
}
366
}
-
 
367
#endif
364
368
365
static int load_module(xmp_context opaque, HIO_HANDLE *h)
369
static int load_module(xmp_context opaque, HIO_HANDLE *h)
366
{
370
{
367
        struct context_data *ctx = (struct context_data *)opaque;
371
        struct context_data *ctx = (struct context_data *)opaque;
368
        struct module_data *m = &ctx->m;
372
        struct module_data *m = &ctx->m;
Line 462... Line 466...
462
    err_load:
466
    err_load:
463
        xmp_release_module(opaque);
467
        xmp_release_module(opaque);
464
        return -XMP_ERROR_LOAD;
468
        return -XMP_ERROR_LOAD;
465
}
469
}
466
470
-
 
471
#ifdef EDUKE32_DISABLED
467
int xmp_load_module(xmp_context opaque, char *path)
472
int xmp_load_module(xmp_context opaque, char *path)
468
{
473
{
469
        struct context_data *ctx = (struct context_data *)opaque;
474
        struct context_data *ctx = (struct context_data *)opaque;
470
#ifndef LIBXMP_CORE_PLAYER
475
#ifndef LIBXMP_CORE_PLAYER
471
        struct module_data *m = &ctx->m;
476
        struct module_data *m = &ctx->m;
Line 541... Line 546...
541
        hio_close(h);
546
        hio_close(h);
542
        unlink_temp_file(temp_name);
547
        unlink_temp_file(temp_name);
543
        return ret;
548
        return ret;
544
#endif
549
#endif
545
}
550
}
-
 
551
#endif
546
552
547
int xmp_load_module_from_memory(xmp_context opaque, void *mem, long size)
553
int xmp_load_module_from_memory(xmp_context opaque, void *mem, long size)
548
{
554
{
549
        struct context_data *ctx = (struct context_data *)opaque;
555
        struct context_data *ctx = (struct context_data *)opaque;
550
        struct module_data *m = &ctx->m;
556
        struct module_data *m = &ctx->m;
Line 571... Line 577...
571
        hio_close(h);
577
        hio_close(h);
572
578
573
        return ret;
579
        return ret;
574
}
580
}
575
581
-
 
582
#ifdef EDUKE32_DISABLED
576
int xmp_load_module_from_file(xmp_context opaque, void *file, long size)
583
int xmp_load_module_from_file(xmp_context opaque, void *file, long size)
577
{
584
{
578
        struct context_data *ctx = (struct context_data *)opaque;
585
        struct context_data *ctx = (struct context_data *)opaque;
579
        struct module_data *m = &ctx->m;
586
        struct module_data *m = &ctx->m;
580
        HIO_HANDLE *h;
587
        HIO_HANDLE *h;
Line 596... Line 603...
596
603
597
        hio_close(h);
604
        hio_close(h);
598
605
599
        return ret;
606
        return ret;
600
}
607
}
-
 
608
#endif
601
609
602
void xmp_release_module(xmp_context opaque)
610
void xmp_release_module(xmp_context opaque)
603
{
611
{
604
        struct context_data *ctx = (struct context_data *)opaque;
612
        struct context_data *ctx = (struct context_data *)opaque;
605
        struct module_data *m = &ctx->m;
613
        struct module_data *m = &ctx->m;