updated: [2f6f6af] fixed comments to /* ... */



The following commit has been merged in the mc-4.6 branch:
commit 2f6f6af4259f261f58c4e6dfd2c4ebd0a6e1a803
Author: Enrico Weigelt, metux IT service <weigelt metux de>
Date:   Tue Jan 27 22:04:12 2009 +0100

    fixed comments to /* ... */

diff --git a/ChangeLog b/ChangeLog
index 016036d..92ad454 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-27 Enrico Weigelt, metux IT service <weigelt metux de>
+
+	* mhl/escape.h, mhl/string.h: fixed comments to use /* ... */
+
 2009-01-25 Ilia Maslakov <il smind gmail com>
 
 	* src/boxes.c, src/boxes.h, src/dir.c, src/dir.h:
diff --git a/mhl/escape.h b/mhl/escape.h
index 2533388..8366833 100644
--- a/mhl/escape.h
+++ b/mhl/escape.h
@@ -54,12 +54,12 @@ static inline char* mhl_shell_unescape_buf(char* text)
     if (!text)
 	return NULL;
 
-    // look for the first \ - that's quick skipover if there's nothing to escape
+    /* look for the first \ - that's quick skipover if there's nothing to escape */
     char* readptr = text;
     while ((*readptr) && ((*readptr)!='\\'))	readptr++;
     if (!(*readptr)) return text;
 
-    // if we're here, we're standing on the first '\'
+    /* if we're here, we're standing on the first '\' */
     char* writeptr = readptr;
     char c;
     while ((c = *readptr))
@@ -97,7 +97,7 @@ static inline char* mhl_shell_unescape_buf(char* text)
 		    (*writeptr) = c; writeptr++; break;
 	    }
 	}
-	else	// got a normal character
+	else	/* got a normal character */
 	{
 	    (*writeptr) = *readptr;
 	    writeptr++;
diff --git a/mhl/string.h b/mhl/string.h
index e3c7d2f..c50228d 100644
--- a/mhl/string.h
+++ b/mhl/string.h
@@ -16,30 +16,29 @@ static inline char * mhl_str_dup_range(const char * s_start, const char * s_boun
 
 static inline char* mhl_str_trim(char* str)
 {
-    if (!str) return NULL;	// NULL string ?! bail out.
+    if (!str) return NULL;	/* NULL string ?! bail out. */
 
-    // find the first non-space
+    /* find the first non-space */
     char* start; for (start=str; ((*str) && (!isspace(*str))); str++);
 
-    // only spaces ?
+    /* only spaces ? */
     if (!(*str)) { *str = 0; return str; }
 
-    // get the size (cannot be empty - catched above)
+    /* get the size (cannot be empty - catched above) */
     size_t _sz = strlen(str);
 
-    // find the proper end
+    /* find the proper end */
     char* end;
     for (end=(str+_sz-1); ((end>str) && (isspace(*end))); end--);
-    end[1] = 0;		// terminate, just to be sure
+    end[1] = 0;		/* terminate, just to be sure */
 
-    // if we have no leading spaces, just trucate
+    /* if we have no leading spaces, just trucate */
     if (start==str) { end++; *end = 0; return str; }
 
-
-    // if it' only one char, dont need memmove for that    
+    /* if it' only one char, dont need memmove for that */
     if (start==end) { str[0]=*start; str[1]=0; return str; }
 
-    // by here we have a (non-empty) region between start end end 
+    /* by here we have a (non-empty) region between start end end */
     memmove(str,start,(end-start+1));
     return str;
 }
@@ -70,10 +69,9 @@ static inline char* __mhl_str_concat_hlp(const char* base, ...)
     va_list args;
     va_start(args,base);
     char* a;
-    // note: we use ((char*)(1)) as terminator - NULL is a valid argument !
+    /* note: we use ((char*)(1)) as terminator - NULL is a valid argument ! */
     while ((a = va_arg(args, char*))!=(char*)1)
     {
-//	printf("a=%u\n", a);
 	if (a)
 	{
 	    arg_ptr[count] = a;
@@ -86,7 +84,7 @@ static inline char* __mhl_str_concat_hlp(const char* base, ...)
     if (!count)
 	return mhl_str_dup("");
 
-    // now as we know how much to copy, allocate the buffer
+    /* now as we know how much to copy, allocate the buffer */
     char* buffer = (char*)mhl_mem_alloc_u(totalsize+2);
     char* current = buffer;
     int x=0;
@@ -104,8 +102,8 @@ static inline char* __mhl_str_concat_hlp(const char* base, ...)
 
 static inline char* mhl_str_reverse(char* ptr)
 {
-    if (!ptr) 	 		return NULL;	// missing string
-    if (!(ptr[0] && ptr[1]))	return ptr;	// empty or 1-ch string
+    if (!ptr) 	 		return NULL;	/* missing string */
+    if (!(ptr[0] && ptr[1]))	return ptr;	/* empty or 1-ch string */
 
     size_t _sz = strlen(ptr);
     char* start = ptr;

-- 
Midnight Commander Development


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]