chiark / gitweb /
Release 1.1.6.
[rocl] / elite.c
diff --git a/elite.c b/elite.c
index 11037fbf2c94b321f75d8283569e464211310920..e6e90f22e5048a43c259736a9d6dbc66ead1a55f 100644 (file)
--- a/elite.c
+++ b/elite.c
@@ -1,24 +1,22 @@
 /* -*-c-*-
- *
- * $Id$
  *
  * Elite planet data
  *
  * (c) 2003 Mark Wooding
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -103,7 +101,7 @@ static void world_us(Tcl_Obj *o)
   o->bytes = p;
   o->length = 12;
   for (i = 0; i < 6; i++, p += 2)
-    sprintf(p, "%02x", w->x[i]);  
+    sprintf(p, "%02x", w->x[i]);
 }
 
 static void world_dir(Tcl_Obj *o, Tcl_Obj *oo)
@@ -315,7 +313,7 @@ static void goatsoup(Tcl_Obj *d, const char *pn, world *w, const char *p)
        p++;
        j = mangle(w);
        goatsoup(d, pn, w, desc[i][(j >= 0x33) + (j >= 0x66) +
-                                  (j >= 0x99) + (j >= 0xcc)]);
+                                  (j >= 0x99) + (j >= 0xcc)]);
        break;
       case '%':
        p++;
@@ -364,7 +362,7 @@ static int cmd_worldinfo(ClientData cd, Tcl_Interp *ti,
   world ww;
 
   /* --- Check arguments --- */
-  
+
   if (objc != 3)
     return (err(ti, "usage: elite-worldinfo ARR SEED"));
   if ((w = world_get(ti, objv[2])) == 0)
@@ -379,15 +377,15 @@ static int cmd_worldinfo(ClientData cd, Tcl_Interp *ti,
                     TCL_LEAVE_ERR_MSG) ||
       !Tcl_SetVar2Ex(ti, arr, "y", Tcl_NewIntObj(wi.y * 2),
                     TCL_LEAVE_ERR_MSG) ||
-      !Tcl_SetVar2Ex(ti, arr, "government", Tcl_NewIntObj(wi.gov), 
+      !Tcl_SetVar2Ex(ti, arr, "government", Tcl_NewIntObj(wi.gov),
                    TCL_LEAVE_ERR_MSG) ||
       !Tcl_SetVar2Ex(ti, arr, "economy", Tcl_NewIntObj(wi.eco),
                     TCL_LEAVE_ERR_MSG) ||
-      !Tcl_SetVar2Ex(ti, arr, "techlevel", Tcl_NewIntObj(wi.tech), 
+      !Tcl_SetVar2Ex(ti, arr, "techlevel", Tcl_NewIntObj(wi.tech),
                    TCL_LEAVE_ERR_MSG) ||
-      !Tcl_SetVar2Ex(ti, arr, "population", Tcl_NewIntObj(wi.pop), 
+      !Tcl_SetVar2Ex(ti, arr, "population", Tcl_NewIntObj(wi.pop),
                    TCL_LEAVE_ERR_MSG) ||
-      !Tcl_SetVar2Ex(ti, arr, "productivity", Tcl_NewIntObj(wi.prod), 
+      !Tcl_SetVar2Ex(ti, arr, "productivity", Tcl_NewIntObj(wi.prod),
                    TCL_LEAVE_ERR_MSG) ||
       !Tcl_SetVar2Ex(ti, arr, "radius", Tcl_NewIntObj(wi.rad),
                     TCL_LEAVE_ERR_MSG) ||
@@ -700,7 +698,7 @@ static int put_items(Tcl_Interp *ti, /*const*/ char *arr,
       return (-1);
     *p++ = ii;
   }
-  return (0);  
+  return (0);
 }
 
 static struct cmddata cmdtab[] = {
@@ -916,7 +914,7 @@ static int cmd_adjacency(ClientData cd, Tcl_Interp *ti,
       goto done;
   }
   for (i = 0; i < oc; i += 3) {
-    s = Tcl_GetString(ov[i]);  
+    s = Tcl_GetString(ov[i]);
     Tcl_CreateHashEntry(&done, s, &dummy);
     if (Tcl_GetLongFromObj(ti, ov[i + 1], &x) != TCL_OK ||
        Tcl_GetLongFromObj(ti, ov[i + 2], &y) != TCL_OK)
@@ -977,7 +975,7 @@ int Elite_SafeInit(Tcl_Interp *ti)
   } cmds[] = {
     { "elite-nextworld",       cmd_nextworld },
     { "elite-nextgalaxy",      cmd_nextgalaxy },
-    { "elite-worldinfo",       cmd_worldinfo },
+    { "elite-worldinfo",       cmd_worldinfo },
     { "elite-market",          cmd_market },
     { "elite-unpackcmdr",      cmd_unpackcmdr },
     { "elite-packcmdr",                cmd_packcmdr },