Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9839 → Rev 9840

/programs/emulator/dgen-sdl-1.33/Tupfile.lua
1,7 → 1,7
if tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == ""
then
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation
if tup.getconfig("NO_NASM") ~= "" then return end
HELPERDIR = "../../"
end
tup.include(HELPERDIR .. "/use_gcc.lua")
8,8 → 8,7
tup.include(HELPERDIR .. "/use_newlib.lua")
tup.include(HELPERDIR .. "/use_sdl_newlib.lua")
 
CFLAGS = CFLAGS_OPTIMIZE_SPEED ..[[ -DPACKAGE_NAME=\"DGen/SDL\" -DPACKAGE_TARNAME=\"dgen-sdl\" -DPACKAGE_VERSION=\"1.33\" -DPACKAGE_STRING=\"DGen/SDL\ 1.33\" -DPACKAGE_BUGREPORT=\"zamaz@users.sourceforge.net\" -DPACKAGE_URL=\"http://sourceforge.net/projects/dgen\" -DPACKAGE=\"dgen-sdl\" -DVERSION=\"1.33\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FTELLO=1 -DHAVE_GLOB_H=1 -DWITH_JOYSTICK=1 -DWITH_MUSA=1 -DWITH_STAR=1 -DWITH_MZ80=1 -DWITH_CZ80=1 -DWITH_X86_ASM=1 -DHAVE_MEMCPY_H=1 -DWITH_CTV=1 -DWITH_SCALE2X=1 -DWITH_X86_MZ80=1 -DWITH_X86_MMX=1 -DWITH_X86_CTV=1 -DWITH_X86_TILES=1 ]]
 
CFLAGS = CFLAGS_OPTIMIZE_SPEED
LDFLAGS = LDFLAGS .. " --subsystem native"
INCLUDES = INCLUDES .. " -Isdl -I. -Iscale2x"
 
/programs/emulator/dgen-sdl-1.33/config.h
0,0 → 1,33
#pragma once
 
#define PACKAGE_NAME "DGen/SDL"
#define PACKAGE_TARNAME "dgen-sdl"
#define PACKAGE_VERSION "1.33"
#define PACKAGE_STRING "DGen/SDL-1.33"
#define PACKAGE_BUGREPORT "zamaz@users.sourceforge.net"
#define PACKAGE_URL "http://sourceforge.net/projects/dgen"
#define PACKAGE "dgen-sdl"
#define VERSION "1.33"
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FTELLO 1
#define HAVE_GLOB_H 1
#define WITH_MUSA 1
#define WITH_STAR 1
#define WITH_MZ80 1
#define WITH_CZ80 1
#define WITH_X86_ASM 1
#define HAVE_MEMCPY_H 1
#define WITH_CTV 1
#define WITH_SCALE2X 1
#define WITH_X86_MZ80 1
#define WITH_X86_MMX 1
#define WITH_X86_CTV 1
#define WITH_X86_TILES 1
#define NDEBUG
/programs/emulator/dgen-sdl-1.33/md.h
3,6 → 3,8
#ifndef __MD_H__
#define __MD_H__
 
#include "config.h"
 
#define VER VERSION
 
#include <stdint.h>
/programs/emulator/dgen-sdl-1.33/sdl/sdl.cpp
6309,8 → 6309,8
};
unsigned int hat_value_map;
intptr_t joypad;
#endif
bool pressed;
#endif
uint32_t plist[8];
uint32_t rlist[8];
unsigned int i, pi, ri;
/programs/emulator/dgen-sdl-1.33/system.c
40,7 → 40,8
#endif
 
#ifdef _KOLIBRI
char* dgen_conf_dir = "/tmp0/1";
char* kos_dgen_userdir = "/tmp0/1";
 
#endif
 
static const char *fopen_mode(unsigned int mode)
181,7 → 182,7
}
#ifndef __MINGW32__
#ifdef _KOLIBRI
strncpy(path, dgen_conf_dir, sz_dir);
strncpy(path, kos_dgen_userdir, sz_dir);
#else
strncpy(path, pwd->pw_dir, sz_dir);
#endif
231,7 → 232,7
return NULL;
sz_dir = strlen(pwd->pw_dir);
#else
sz_dir = strlen(dgen_conf_dir);
sz_dir = strlen(kos_dgen_userdir);
#endif
#endif
 
263,7 → 264,7
#ifndef _KOLIBRI
strncpy(path, pwd->pw_dir, sz_dir);
#else
strncpy(path, dgen_conf_dir, sz_dir);
strncpy(path, kos_dgen_userdir, sz_dir);
#endif
#else
if (SHGetFolderPath(NULL, (CSIDL_APPDATA | CSIDL_FLAG_CREATE),
352,9 → 353,12
goto error;
size = strlen(path);
}
printf("HOME=%s\n", path);
#ifndef KOLIBRI
if ((mode & (DGEN_WRITE | DGEN_APPEND)) && (path != NULL))
mkdir(path, 0777); /* XXX make that recursive */
#else
mkdir(path, 0777);
#endif
file_size = strlen(file);
if ((tmp = realloc(path, (size + !!size + file_size + 1))) == NULL)
goto error;
374,7 → 378,6
errno = e;
return f;
error:
puts("ERROR");
free(path);
errno = EACCES;
return NULL;