[936] in BarnOwl Developers
[D-O-H] r923 - trunk/owl
daemon@ATHENA.MIT.EDU (asedeno@MIT.EDU)
Thu Oct 29 18:11:19 2009
Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@nelhage.com
To: dirty-owl-hackers@mit.edu
From: asedeno@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Sun, 3 Feb 2008 01:01:07 -0500 (EST)
Author: asedeno
Date: 2008-02-03 01:01:07 -0500 (Sun, 03 Feb 2008)
New Revision: 923
Modified:
trunk/owl/dict.c
trunk/owl/editwin.c
trunk/owl/filter.c
trunk/owl/filterelement.c
trunk/owl/fmtext.c
trunk/owl/functions.c
trunk/owl/logging.c
trunk/owl/obarray.c
trunk/owl/perlconfig.c
trunk/owl/util.c
trunk/owl/variable.c
Log:
Portability - removing C++ style comments.
Modified: trunk/owl/dict.c
===================================================================
--- trunk/owl/dict.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/dict.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -178,7 +178,7 @@
owl_list_free_all(&l, owl_free);
owl_dict_free_all(&d, NULL);
- // if (numfailed) printf("*** WARNING: failures encountered with owl_dict\n");
+ /* if (numfailed) printf("*** WARNING: failures encountered with owl_dict\n"); */
printf("# END testing owl_dict (%d failures)\n", numfailed);
return(numfailed);
}
Modified: trunk/owl/editwin.c
===================================================================
--- trunk/owl/editwin.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/editwin.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -35,9 +35,9 @@
e->dotsend=0;
e->echochar='\0';
+ /* We get initialized multiple times, but we need to hold on to
+ the callbacks, so we can't NULL them here. */
/*
- // We get initialized multiple times, but we need to hold on to
- // the callbacks, so we can't NULL them here.
e->command = NULL;
e->callback = NULL;
e->cbdata = NULL;
@@ -115,7 +115,7 @@
if(!cb) {
owl_function_error("Internal error: No editwin callback!");
} else {
- // owl_function_error("text: |%s|", owl_editwin_get_text(e));
+ /* owl_function_error("text: |%s|", owl_editwin_get_text(e)); */
cb(e);
}
}
Modified: trunk/owl/filter.c
===================================================================
--- trunk/owl/filter.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/filter.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -340,7 +340,7 @@
TEST_FILTER("class owl and instance tester", 1);
TEST_FILTER("type ^zephyr$ and direction ^in$ and ( class ^owl$ or instance ^owl$ )", 1);
- // Order of operations and precedence
+ /* Order of operations and precedence */
TEST_FILTER("not true or false", 0);
TEST_FILTER("true or true and false", 0);
TEST_FILTER("true and true and false or true", 1);
@@ -351,10 +351,10 @@
owl_global_add_filter(&g, &f1);
TEST_FILTER("filter f1", 1);
- // Test recursion prevention
+ /* Test recursion prevention */
FAIL_UNLESS("self reference", owl_filter_init_fromstring(&f2, "test", "filter test"));
- // mutual recursion
+ /* mutual recursion */
owl_filter_init_fromstring(&f3, "f3", "filter f4");
owl_global_add_filter(&g, &f3);
FAIL_UNLESS("mutual recursion", owl_filter_init_fromstring(&f4, "f4", "filter f3"));
Modified: trunk/owl/filterelement.c
===================================================================
--- trunk/owl/filterelement.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/filterelement.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -123,7 +123,7 @@
return !owl_filterelement_match(fe->left, m);
}
-// Print methods
+/* Print methods */
static void owl_filterelement_print_true(owl_filterelement *fe, char *buf)
{
@@ -181,7 +181,7 @@
owl_filterelement_print(fe->left, buf);
}
-// Constructors
+/* Constructors */
void owl_filterelement_create(owl_filterelement *fe) {
fe->field = NULL;
Modified: trunk/owl/fmtext.c
===================================================================
--- trunk/owl/fmtext.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/fmtext.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -688,11 +688,11 @@
/*** Color Pair manager ***/
void owl_fmtext_init_colorpair_mgr(owl_colorpair_mgr *cpmgr)
{
- // This could be a bitarray if we wanted to save memory.
+ /* This could be a bitarray if we wanted to save memory. */
short i, j;
cpmgr->next = 8;
- // The test is <= because we allocate COLORS+1 entries.
+ /* The test is <= because we allocate COLORS+1 entries. */
cpmgr->pairs = owl_malloc((COLORS+1) * sizeof(short*));
for(i = 0; i <= COLORS; i++) {
cpmgr->pairs[i] = owl_malloc((COLORS+1) * sizeof(short));
@@ -718,7 +718,7 @@
owl_colorpair_mgr *cpmgr = owl_global_get_colorpair_mgr(&g);
cpmgr->next = 8;
- // The test is <= because we allocated COLORS+1 entries.
+ /* The test is <= because we allocated COLORS+1 entries. */
for(i = 0; i <= COLORS; i++) {
for(j = 0; j <= COLORS; j++) {
cpmgr->pairs[i][j] = -1;
@@ -752,26 +752,25 @@
default_bg = COLOR_BLACK;
#endif
- // looking for a pair we already set up for this draw.
+ /* looking for a pair we already set up for this draw. */
cpmgr = owl_global_get_colorpair_mgr(&g);
pair = cpmgr->pairs[fg+1][bg+1];
if (!(pair != -1 && pair < cpmgr->next)) {
-/* owl_global_set_needrefresh(&g);*/
- // If we didn't find a pair, search for a free one to assign.
+ /* If we didn't find a pair, search for a free one to assign. */
pair = (cpmgr->next < COLOR_PAIRS) ? cpmgr->next : -1;
if (pair != -1) {
- // We found a free pair, initialize it.
+ /* We found a free pair, initialize it. */
init_pair(pair, fg, bg);
cpmgr->pairs[fg+1][bg+1] = pair;
cpmgr->next++;
}
else if (bg != OWL_COLOR_DEFAULT) {
- // We still don't have a pair, drop the background color. Too bad.
+ /* We still don't have a pair, drop the background color. Too bad. */
owl_function_debugmsg("colorpairs: color shortage - dropping background color.");
pair = owl_fmtext_get_colorpair(fg, OWL_COLOR_DEFAULT);
}
else {
- // We still don't have a pair, defaults all around.
+ /* We still don't have a pair, defaults all around. */
owl_function_debugmsg("colorpairs: color shortage - dropping foreground and background color.");
pair = 0;
}
Modified: trunk/owl/functions.c
===================================================================
--- trunk/owl/functions.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/functions.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -1371,7 +1371,7 @@
{
redrawwin(owl_global_get_curs_recwin(&g));
redrawwin(owl_global_get_curs_sepwin(&g));
- // Work around curses segfualts with windows off the screen
+ /* Work around curses segfualts with windows off the screen */
if (g.lines >= owl_global_get_typwin_lines(&g)+2)
redrawwin(owl_global_get_curs_typwin(&g));
if (g.lines >= 2)
Modified: trunk/owl/logging.c
===================================================================
--- trunk/owl/logging.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/logging.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -138,7 +138,7 @@
/* Figure out what path to log to */
if (owl_message_is_type_zephyr(m)) {
- // If this has CC's, do all but the "recipient" which we'll do below
+ /* If this has CC's, do all but the "recipient" which we'll do below */
to = owl_message_get_cc_without_recipient(m);
if (to != NULL) {
temp = strtok(to, " ");
@@ -316,8 +316,9 @@
owl_log_append(m, filename);
if (personal && owl_message_is_type_zephyr(m)) {
- // We want to log to all of the CC'd people who were not us, or
- // the sender, as well.
+ /* We want to log to all of the CC'd people who were not us, or
+ * the sender, as well.
+ */
char *cc, *temp;
cc = owl_message_get_cc_without_recipient(m);
if (cc != NULL) {
Modified: trunk/owl/obarray.c
===================================================================
--- trunk/owl/obarray.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/obarray.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -9,9 +9,10 @@
* rare)
*/
-// Helper method: Lookup a key in the obarray. If the key exists,
-// return its index, and the interned value in *val. Otherwise, return
-// the index it should be inserted at.
+/* Helper method: Lookup a key in the obarray. If the key exists,
+ * return its index, and the interned value in *val. Otherwise, return
+ * the index it should be inserted at.
+ */
int owl_obarray_lookup(owl_obarray *oa, char * key, char ** val) /*noproto*/
{
int first, last, mid;
@@ -38,7 +39,7 @@
return mid;
}
-// Returns NULL if the string doesn't exist in the obarray
+/* Returns NULL if the string doesn't exist in the obarray */
char * owl_obarray_find(owl_obarray *oa, char * string)
{
char *v;
@@ -46,7 +47,7 @@
return v;
}
-// Inserts the string into the obarray if it doesn't exist
+/* Inserts the string into the obarray if it doesn't exist */
char * owl_obarray_insert(owl_obarray *oa, char * string)
{
char *v;
Modified: trunk/owl/perlconfig.c
===================================================================
--- trunk/owl/perlconfig.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/perlconfig.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -13,7 +13,7 @@
extern XS(boot_BarnOwl);
extern XS(boot_DynaLoader);
-// extern XS(boot_DBI);
+/* extern XS(boot_DBI); */
static void owl_perl_xs_init(pTHX)
{
Modified: trunk/owl/util.c
===================================================================
--- trunk/owl/util.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/util.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -817,7 +817,7 @@
FAIL_UNLESS("owl_util_uniq 3",
!strcmp("meep foo bar", owl_util_uniq("meep foo", "bar foo meep", "-")));
- // if (numfailed) printf("*** WARNING: failures encountered with owl_util\n");
+ /* if (numfailed) printf("*** WARNING: failures encountered with owl_util\n"); */
printf("# END testing owl_util (%d failures)\n", numfailed);
return(numfailed);
}
Modified: trunk/owl/variable.c
===================================================================
--- trunk/owl/variable.c 2008-02-03 05:49:46 UTC (rev 922)
+++ trunk/owl/variable.c 2008-02-03 06:01:07 UTC (rev 923)
@@ -1082,7 +1082,7 @@
owl_variable_dict_free(&vd);
- // if (numfailed) printf("*** WARNING: failures encountered with owl_variable\n");
+ /* if (numfailed) printf("*** WARNING: failures encountered with owl_variable\n"); */
printf("# END testing owl_variable (%d failures)\n", numfailed);
return(numfailed);
}