From 506ea20d36d51c0f29af693d557743f84cf8b627 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 29 Apr 2009 17:28:44 +0000 Subject: [PATCH] =?UTF-8?q?Sparc=20CPU=20does=20not=20like=20accessing=20n?= =?UTF-8?q?on-aligned=20things.=20Depack=20some=20structures=20so=20the=20?= =?UTF-8?q?program=20don't=20crash.=20We=20should=20probably=20fix=20every?= =?UTF-8?q?=20struct,=20but=20I'm=20too=20lazy=20to=20check=20all=20of=20t?= =?UTF-8?q?hem=20right=20now=20(could=20corrupt=20saving=20and/or=20loadin?= =?UTF-8?q?g).=20Added=20G=C3=BCrkan=20Seng=C3=BCn=20to=20the=20bugfinders?= =?UTF-8?q?=20as=20he=20found=20the=20problem.=20Thanks=20!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@759 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- gfx2.cfg | Bin 10062 -> 10062 bytes helpfile.h | 25 +++++++++++++------------ mountlist.c | 4 +++- op_c.c | 2 +- setup.c | 4 +++- struct.h | 4 ++-- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/gfx2.cfg b/gfx2.cfg index 706cc05c7a5b4517d8b026634296a6c81a4db0b0..9c4e6a83d0742434008f261d44ac7eaa97779847 100644 GIT binary patch delta 22 ccmX@-cg}BvDf4DWX%>#n_Tp?jK!RTY09|GVe*gdg delta 270 zcmWN{*D_oI007WqcE>Q|L0J~7W~2A$f+dO0>YXHdCnN+3e#y-Khi`IU&eM5Iz9nBf zLoeBKNRN8q*+TaTDAG4U58Fxy7lPQ z=d*qT1|@>_98VLiiA>$Sb9b(5lznu2xp{5 H;+f%hEzv04 diff --git a/helpfile.h b/helpfile.h index eaf8a553..37dbf0b3 100644 --- a/helpfile.h +++ b/helpfile.h @@ -324,26 +324,27 @@ static const T_Help_table helptable_credits[] = HELP_TEXT ("") HELP_TEXT (" BDCIron Ced El Topo ") HELP_TEXT (" fallenblood Frost Grimmy ") - HELP_TEXT (" iLKke keito kusma ") - HELP_TEXT (" Lord Graga mind MooZ ") - HELP_TEXT (" richienyhus TeeEmCee tempest ") - HELP_TEXT (" Timo Kurrpa titus^Rab Tobé ") - HELP_TEXT (" 00ai99 00.rgb.studios") + HELP_TEXT (" Gürkan Sengün iLKke keito ") + HELP_TEXT (" kusma Lord Graga mind ") + HELP_TEXT (" MooZ richienyhus TeeEmCee ") + HELP_TEXT (" tempest Timo Kurrpa titus^Rab ") + HELP_TEXT (" Tobé 00ai99 00.rgb.studios") HELP_TEXT ("") HELP_TEXT (" Posted the annoying bugreports") HELP_TEXT ("") HELP_TITLE(" FILE FORMATS CREDITS") HELP_TEXT ("") - HELP_TEXT (" PKM : Sunset Design") - HELP_TEXT (" LBM : Electronic Arts") - HELP_TEXT (" GIF : Compuserve") HELP_TEXT (" BMP : Microsoft") - HELP_TEXT (" PCX : Z-Soft") - HELP_TEXT (" IMG : Bivas (W. Wiedmann?)") - HELP_TEXT (" SCx : Colorix (?)") HELP_TEXT (" CEL,KCF : K.O.S. (KISekae Set system)") - HELP_TEXT (" PI1,PC1 : Degas Elite") + HELP_TEXT (" GIF : Compuserve") + HELP_TEXT (" IMG : Bivas (W. Wiedmann?)") + HELP_TEXT (" LBM : Electronic Arts") HELP_TEXT (" PAL : ermmh... nobody (?)") + HELP_TEXT (" PCX : Z-Soft") + HELP_TEXT (" PI1,PC1 : Degas Elite") + HELP_TEXT (" PKM : Sunset Design") + HELP_TEXT (" PNG : ") + HELP_TEXT (" SCx : Colorix (?)") HELP_TEXT ("") HELP_TITLE (" OUR HOMEPAGE") // HELP_TEXT ("") // diff --git a/mountlist.c b/mountlist.c index 90aa2ec3..66dad4a0 100644 --- a/mountlist.c +++ b/mountlist.c @@ -159,6 +159,8 @@ #undef opendir #undef closedir +// gcc2 under haiku and beos don't like these macros for some reason. +// As they are not used there anyways, we remove them and everyone is happy. #if !defined(__HAIKU__) && !defined(__BEOS__) #ifndef ME_DUMMY # define ME_DUMMY(Fs_name, Fs_type) \ @@ -180,7 +182,6 @@ || strcmp (Fs_type, "nfs") == 0 \ || strcmp (Fs_type, "volfs") == 0) #endif -#endif #ifndef ME_REMOTE /* A file system is `remote' if its Fs_name contains a `:' @@ -192,6 +193,7 @@ && (strcmp (Fs_type, "smbfs") == 0 \ || strcmp (Fs_type, "cifs") == 0))) #endif +#endif // HAIKU / BEOS #ifdef MOUNTED_GETMNTINFO diff --git a/op_c.c b/op_c.c index 35027326..1085556f 100644 --- a/op_c.c +++ b/op_c.c @@ -962,7 +962,7 @@ void GS_Generate(T_Gradient_set * ds,T_Cluster_set * cs) int diff; // difference de chrominance courante // Pour chacun des clusters … traiter - for (ic=1;icnb;ic++) + for (ic=0;icnb;ic++) { // On recherche le d‚grad‚ le plus proche de la chrominance du cluster best_gradient=-1; diff --git a/setup.c b/setup.c index a70951a7..ecf33ee0 100644 --- a/setup.c +++ b/setup.c @@ -85,16 +85,18 @@ void Set_program_directory(ARG_UNUSED const char * argv0,char * program_dir) Extract_path(program_dir, argv0); #endif } + // Determine which directory contains the read-only data. // IN: The directory containing the executable // OUT: Write into data_dir. Trailing / or \ is kept. void Set_data_directory(const char * program_dir, char * data_dir) { // On all platforms, data is in the executable's directory - strcpy(data_dir,program_dir); // Except MacOSX: #if defined(__macosx__) strcat(data_dir,"Contents/Resources/"); + #else + strcpy(data_dir,program_dir); #endif } diff --git a/struct.h b/struct.h index ef4dd931..c149f38a 100644 --- a/struct.h +++ b/struct.h @@ -181,7 +181,7 @@ typedef struct dword Inverse; ///< Boolean, true if the gradient goes in descending order dword Mix; ///< Amount of randomness to add to the mix (0-255) dword Technique;///< Gradient technique: 0 (no pattern) 1 (dithering), or 2 (big dithering) -} __attribute__((__packed__)) T_Gradient_array; +} T_Gradient_array; /// Data for one setting of shade. Warning, this one is saved/loaded as binary. typedef struct @@ -214,7 +214,7 @@ typedef struct { byte Number; ///< Section identfier. Possible values are in enum ::CHUNKS_CFG word Size; ///< Size of the configuration block that follows, in bytes. -} __attribute__((__packed__)) T_Config_chunk; +} T_Config_chunk; /// Configuration for one keyboard shortcut in gfx2.cfg. Warning, this one is saved/loaded as binary. typedef struct