changeset 4432:f9103f3fdcd5 draft

(svn r6195) -Codechange: do not use '//' in '/* ... */' style comments and '/*' or '*/' in '//' style comments.
author rubidium <rubidium@openttd.org>
date Mon, 28 Aug 2006 10:14:37 +0000
parents ac3d3c272965
children a53a25abf02e
files console.h engine.c functions.h lzoconf.h music_gui.c train_cmd.c vehicle_gui.c
diffstat 7 files changed, 45 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/console.h
+++ b/console.h
@@ -101,12 +101,12 @@
 	char *cmdline;              // command(s) that is/are being aliased
 } IConsoleAlias;
 
-// ** console parser ** //
+/* console parser */
 VARDEF IConsoleCmd   *_iconsole_cmds;    // list of registred commands
 VARDEF IConsoleVar   *_iconsole_vars;    // list of registred vars
 VARDEF IConsoleAlias *_iconsole_aliases; // list of registred aliases
 
-// ** console colors/modes ** //
+/* console colors/modes */
 VARDEF byte _icolour_def;
 VARDEF byte _icolour_err;
 VARDEF byte _icolour_warn;
@@ -114,7 +114,7 @@
 VARDEF byte _icolour_cmd;
 VARDEF IConsoleModes _iconsole_mode;
 
-// ** console functions ** //
+/* console functions */
 void IConsoleInit(void);
 void IConsoleFree(void);
 void IConsoleClearBuffer(void);
@@ -123,38 +123,38 @@
 void IConsoleClose(void);
 void IConsoleOpen(void);
 
-// ** console output ** //
+/* console output */
 void IConsolePrint(uint16 color_code, const char *string);
 void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
 void IConsoleDebug(const char *string);
 void IConsoleWarning(const char *string);
 void IConsoleError(const char *string);
 
-// *** Commands *** //
+/* Commands */
 void IConsoleCmdRegister(const char *name, IConsoleCmdProc *proc);
 void IConsoleAliasRegister(const char *name, const char *cmd);
 IConsoleCmd *IConsoleCmdGet(const char *name);
 IConsoleAlias *IConsoleAliasGet(const char *name);
 
-// *** Variables *** //
+/* Variables */
 void IConsoleVarRegister(const char *name, void *addr, IConsoleVarTypes type, const char *help);
 void IConsoleVarStringRegister(const char *name, void *addr, uint32 size, const char *help);
 IConsoleVar* IConsoleVarGet(const char *name);
 void IConsoleVarPrintGetValue(const IConsoleVar *var);
 void IConsoleVarPrintSetValue(const IConsoleVar *var);
 
-// *** Parser *** //
+/* Parser */
 void IConsoleCmdExec(const char *cmdstr);
 void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
 
-// ** console std lib (register ingame commands/aliases/variables) ** //
+/* console std lib (register ingame commands/aliases/variables) */
 void IConsoleStdLibRegister(void);
 
-// ** Hooking code ** //
+/* Hooking code */
 void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
 void IConsoleVarHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
 void IConsoleVarProcAdd(const char *name, IConsoleCmdProc *proc);
 
-// ** Supporting functions **//
+/* Supporting functions */
 bool GetArgumentInteger(uint32 *value, const char *arg);
 #endif /* CONSOLE_H */
--- a/engine.c
+++ b/engine.c
@@ -75,7 +75,7 @@
 
 void LoadCustomEngineNames(void)
 {
-	// XXX: not done */
+	/* XXX: not done */
 	DEBUG(misc, 1) ("LoadCustomEngineNames: not done");
 }
 
--- a/functions.h
+++ b/functions.h
@@ -63,15 +63,15 @@
 
 /* openttd.c */
 
-// **************
-// * Warning: DO NOT enable this unless you understand what it does
-// *
-// * If enabled, in a network game all randoms will be dumped to the
-// *  stdout if the first client joins (or if you are a client). This
-// *  is to help finding desync problems.
-// *
-// * Warning: DO NOT enable this unless you understand what it does
-// **************
+/**************
+ * Warning: DO NOT enable this unless you understand what it does
+ *
+ * If enabled, in a network game all randoms will be dumped to the
+ *  stdout if the first client joins (or if you are a client). This
+ *  is to help finding desync problems.
+ *
+ * Warning: DO NOT enable this unless you understand what it does
+ **************/
 
 //#define RANDOM_DEBUG
 
--- a/lzoconf.h
+++ b/lzoconf.h
@@ -53,8 +53,8 @@
 
 
 /***********************************************************************
-// LZO requires a conforming <limits.h>
-************************************************************************/
+ * LZO requires a conforming <limits.h>
+ ***********************************************************************/
 
 #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
 #  error "invalid CHAR_BIT"
@@ -79,8 +79,8 @@
 
 
 /***********************************************************************
-// architecture defines
-************************************************************************/
+ * architecture defines
+ ***********************************************************************/
 
 #if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2)
 #  if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
@@ -146,8 +146,8 @@
 
 
 /***********************************************************************
-// integral and pointer types
-************************************************************************/
+ * integral and pointer types
+ ***********************************************************************/
 
 /* Integral types with 32 bits or more */
 #if !defined(LZO_UINT32_MAX)
@@ -191,8 +191,8 @@
 
 
 /***********************************************************************
-// memory models
-************************************************************************/
+ * memory models
+ ***********************************************************************/
 
 /* Memory model for the public code segment. */
 #if !defined(__LZO_CMODEL)
@@ -250,8 +250,8 @@
 
 
 /***********************************************************************
-// calling conventions and function types
-************************************************************************/
+ * calling conventions and function types
+ ***********************************************************************/
 
 /* linkage */
 #if !defined(__LZO_EXTERN_C)
@@ -332,8 +332,8 @@
 
 
 /***********************************************************************
-// export information
-************************************************************************/
+ * export information
+ ***********************************************************************/
 
 /* DLL export information */
 #if !defined(__LZO_EXPORT1)
@@ -376,8 +376,8 @@
 
 
 /***********************************************************************
-// error codes and prototypes
-************************************************************************/
+ * error codes and prototypes
+ ***********************************************************************/
 
 /* Error codes for the compression/decompression functions. Negative
  * values are errors, positive values will be used for special but
--- a/music_gui.c
+++ b/music_gui.c
@@ -282,9 +282,11 @@
 			SelectSongToPlay();
 			break;
 
-		//case 12: /* save */
-		//	ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
-		//	break;
+#if 0
+		case 12: /* save */
+			ShowInfo("MusicTrackSelectionWndProc:save not implemented\n");
+			break;
+#endif
 
 		case 5: case 6: case 7: case 8: case 9: case 10: /* set playlist */
 			msf.playlist = e->click.widget - 5;
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1593,7 +1593,7 @@
 		int i;
 
 		// find pairwise matching wagon
-		// start<>end, start+1<>end-1, ... */
+		// start<>end, start+1<>end-1, ...
 		last = first;
 		for (i = length - 3; i > 0; i--) last = last->next;
 
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -494,11 +494,13 @@
 				|| !(rvi->flags & RVI_WAGON) != is_engine ||
 				!HASBIT(e->player_avail, _local_player))
 				continue;
-		} /*else {
-		// TODO find a nice red colour for vehicles being replaced
+#if 0
+		} else {
+			// TODO find a nice red colour for vehicles being replaced
 			if ( _autoreplace_array[i] != i )
 				colour = *sel == 0 ? 0x44 : 0x45;
-		} */
+#endif
+		}
 
 		if (IS_INT_INSIDE(--*pos, -lines_drawn, 0)) {
 			DrawString(*x + 59, *y + 2, GetCustomEngineName(i),