# HG changeset patch
# User Alexander De Sousa <aphanic@hotmail.com>
# Date 1406492252 -7200
#      Sun Jul 27 22:17:32 2014 +0200
# Node ID 370d73d7bde677815f8b291f24894ea7ebccea9d
# Parent  9c68c06d48095e9c2a72c4088c09514602b6fb44
Replace heavy use of the ternary operator for the equivalent if/else tree.

In this point the use of the ternary operator is more of a hindrance than it is a simplification. This will make this section easier to maintain, especially with Unicode builds support.

diff -r 9c68c06d4809 -r 370d73d7bde6 tccpe.c
--- a/tccpe.c	Sat Aug 16 19:48:17 2014 +0200
+++ b/tccpe.c	Sun Jul 27 22:17:32 2014 +0200
@@ -1750,12 +1750,23 @@
     else
         pe_type = PE_EXE;
 
-    start_symbol =
-        TCC_OUTPUT_MEMORY == s1->output_type
-        ? PE_GUI == pe_type ? "__runwinmain" : "_main"
-        : PE_DLL == pe_type ? PE_STDSYM("__dllstart","@12")
-        : PE_GUI == pe_type ? "__winstart" : "__start"
-        ;
+    if (TCC_OUTPUT_MEMORY == s1->output_type) {
+        if (PE_GUI == pe_type) {
+            start_symbol = "__runwinmain";
+        } else {
+            start_symbol = "_main";
+        }
+    } else {
+        if (PE_DLL == pe_type) {
+            start_symbol = PE_STDSYM("__dllstart", "@12");
+        } else {
+            if (PE_GUI == pe_type) {
+                start_symbol = "__winstart";
+            } else {
+                start_symbol = "__start";
+            }
+        }
+    }
 
     if (!s1->leading_underscore || strchr(start_symbol, '@'))
         ++start_symbol;
