[Rawstudio-dev] [PATCH 1 of 3] Add option to use non assembly optimized code

Edouard Gomez ed.gomez at free.fr
Thu Aug 23 23:38:31 CEST 2007


# HG changeset patch
# User Edouard Gomez <ed.gomez at free.fr>
# Date 1187806199 -7200
# Node ID c8262e9225bfbd4eb5e591c8057219360899fda6
# Parent  528964bcdb4c423a8ea183c18a35b4c291d86e89
Add option to use non assembly optimized code

diff --git a/src/rawstudio.c b/src/rawstudio.c
--- a/src/rawstudio.c
+++ b/src/rawstudio.c
@@ -1226,12 +1226,24 @@ main(int argc, char **argv)
 main(int argc, char **argv)
 {
 	RS_BLOB *rs;
+	int optimized = 1;
+	int opt;
+
+	while ((opt = getopt(argc, argv, "n")) != -1) {
+		switch (opt) {
+		case 'n':
+			optimized = 0;
+			break;
+		}
+	}
 
 	/* Bind default C functions */
 	rs_bind_default_functions();
 
 	/* Bind optimized functions if any */
-	rs_bind_optimized_functions();
+	if (likely(optimized)) {
+		rs_bind_optimized_functions();
+	}
 
 #ifdef ENABLE_NLS
 	bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);



More information about the Rawstudio-dev mailing list