[svn:parrot] r36988 - trunk/examples/embed

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Wed Feb 25 04:23:40 UTC 2009


Author: jkeenan
Date: Wed Feb 25 04:23:40 2009
New Revision: 36988
URL: https://trac.parrot.org/parrot/changeset/36988

Log:
Enforce C coding standards re (a) no space between function name and opening
parenthesis; (b) no hard tabs.

Modified:
   trunk/examples/embed/lorito.c

Modified: trunk/examples/embed/lorito.c
==============================================================================
--- trunk/examples/embed/lorito.c	Wed Feb 25 00:10:40 2009	(r36987)
+++ trunk/examples/embed/lorito.c	Wed Feb 25 04:23:40 2009	(r36988)
@@ -53,31 +53,31 @@
 
     if (strcmp(argv[i], "--start") == 0) {
         ++i;
-	if (i >= argc)
+        if (i >= argc)
             fail("Option needs argument");
-	stname = argv[i];
-	++i;
-	goto options;
+        stname = argv[i];
+        ++i;
+        goto options;
     }
     if (strcmp(argv[i], "--runcore") == 0) {
         ++i;
-	if (i >= argc)
-            fail("Option needs argument");
-	if (strcmp(argv[i], "slow") == 0)
-	    runcore = PARROT_SLOW_CORE;
-	else if (strcmp(argv[i], "fast") == 0)
-	    runcore = PARROT_FAST_CORE;
-	else if (strcmp(argv[i], "cgoto") == 0)
-	    runcore = PARROT_CGOTO_CORE;
-	else if (strcmp(argv[i], "jit") == 0)
-	    runcore = PARROT_JIT_CORE;
-	else if (strcmp(argv[i], "gcdebug") == 0)
-	    runcore = PARROT_GC_DEBUG_CORE;
-	else
-	    fail ("Invalid runcore");
-
-	++i;
-	goto options;
+        if (i >= argc)
+                fail("Option needs argument");
+        if (strcmp(argv[i], "slow") == 0)
+            runcore = PARROT_SLOW_CORE;
+        else if (strcmp(argv[i], "fast") == 0)
+            runcore = PARROT_FAST_CORE;
+        else if (strcmp(argv[i], "cgoto") == 0)
+            runcore = PARROT_CGOTO_CORE;
+        else if (strcmp(argv[i], "jit") == 0)
+            runcore = PARROT_JIT_CORE;
+        else if (strcmp(argv[i], "gcdebug") == 0)
+            runcore = PARROT_GC_DEBUG_CORE;
+        else
+            fail("Invalid runcore");
+    
+        ++i;
+        goto options;
     }
 
     Parrot_set_run_core(interp, runcore);
@@ -87,11 +87,11 @@
     pf = Parrot_pbc_read(interp, source, 0);
     if (! pf)
         fail("Cannot load file");
-    Parrot_pbc_load(interp, pf);
+        Parrot_pbc_load(interp, pf);
 
     if (stname) {
         Parrot_PMC rootns = Parrot_get_root_namespace(interp);
-	Parrot_String parrotname = create_string(interp, "parrot");
+        Parrot_String parrotname = create_string(interp, "parrot");
         Parrot_PMC parrotns = Parrot_PMC_get_pmc_strkey(interp, rootns, parrotname);
         Parrot_String name = create_string(interp, stname);
         Parrot_PMC start = Parrot_PMC_get_pmc_strkey(interp, parrotns, name);


More information about the parrot-commits mailing list