From 56432cf3419f4b2f6afe4b37a6bcad16b7afd280 Mon Sep 17 00:00:00 2001 From: Rui Guo Date: Sat, 6 Jun 2009 15:14:40 +0800 Subject: [PATCH] Avoid using // style comment. --- src/lua.c | 4 ++-- src/script.c | 14 +++++++------- src/script.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lua.c b/src/lua.c index b056ff3..bc79eda 100644 --- a/src/lua.c +++ b/src/lua.c @@ -240,10 +240,10 @@ window_get_monitor_status(lua_State *L) struct win *w = check_window(L, 1); int activity = luaL_checkint(L, 2); if (activity) - //monitor + /*monitor*/ lua_pushinteger(L, w->w_monitor != MON_OFF); else - //silence + /*silence*/ lua_pushinteger(L, w->w_silence == SILENCE_ON ? w->w_silencewait: 0); return 1; diff --git a/src/script.c b/src/script.c index 36b9d3a..1b9a728 100644 --- a/src/script.c +++ b/src/script.c @@ -73,11 +73,11 @@ ScriptSource(int argc, const char **argv) * sourcescript [-async|-a] [-binding|-b ] script */ while (*argv && **argv == '-') { - // check for (-a | -async) + /* check for (-a | -async) */ if ((*argv[1] == 'a' && !*argv[2]) || strcmp(*argv, "-async") == 0) async = 1; - // check for (-b | -binding) + /* check for (-b | -binding) */ else if ((*argv[1] == 'b' && !*argv[2]) || strcmp(*argv, "-binding") == 0) { argv++; @@ -89,11 +89,11 @@ ScriptSource(int argc, const char **argv) while (binding) { if (!bd_select || strcmp(bd_select, binding->name) == 0) { - //dynamically initialize the binding + /*dynamically initialize the binding*/ if (!binding->inited) binding->bd_Init(); - //and source the script + /*and source the script*/ if (ret = binding->bd_Source(script, async)) break; } @@ -170,10 +170,10 @@ object_get_event(char *obj, char *name) { if (lo >= n || strcmp(name, event_table[lo].name)) return 0; else { - //found an entry. + /*found an entry.*/ struct script_event *res; res = (struct script_event *) (obj + event_table[lo].offset); - //Setup the parameter record. + /*Setup the parameter record.*/ res->params = event_table[lo].params; return res; } @@ -214,7 +214,7 @@ trigger_sevent(struct script_event *ev, VA_DOTS) if (!ev || !ev->params) return 0; - //process the chain in order, stop if any of the handler returns true. + /*process the chain in order, stop if any of the handler returns true.*/ chain = ev->listeners; params = ev->params; while (chain) diff --git a/src/script.h b/src/script.h index 00e09f8..6b990de 100644 --- a/src/script.h +++ b/src/script.h @@ -22,7 +22,7 @@ #define SCRIPT_H struct win; -//Obsolete +/*Obsolete*/ struct ScriptFuncs { int (*sf_ForeWindowChanged) __P((void)); @@ -50,7 +50,7 @@ void ScriptCmd __P((int argc, const char **argv)); /***Script events***/ -// Script event listener +/* Script event listener */ struct listener { /*Binding dependent event handler data*/ -- 2.11.4.GIT