Author: baggins                      Date: Wed Nov 19 12:33:08 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- remove "inline" abuse

---- Files affected:
SOURCES:
   ekg2-missing-xwcslen.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/ekg2-missing-xwcslen.patch
diff -u SOURCES/ekg2-missing-xwcslen.patch:1.2 
SOURCES/ekg2-missing-xwcslen.patch:1.3
--- SOURCES/ekg2-missing-xwcslen.patch:1.2      Wed Nov 19 13:24:04 2008
+++ SOURCES/ekg2-missing-xwcslen.patch  Wed Nov 19 13:33:02 2008
@@ -8,3 +8,136 @@
  #include "old.h"
  #include "completion.h"
  #include "bindings.h"
+--- ekg2-0.1.1/plugins/ncurses/ecurses.c~      2006-09-23 13:32:45.000000000 
+0200
++++ ekg2-0.1.1/plugins/ncurses/ecurses.c       2008-11-19 13:29:28.528990771 
+0100
+@@ -45,37 +45,37 @@
+ #define fix(x)        ((char *) x ? (char *) x : (char *) "")
+ #define ufix(x)       ((wchar_t *) x ? (wchar_t *) x : (wchar_t *) L"")
+ 
+-inline int xwcslen(CHAR_T *str) {
++ int xwcslen(CHAR_T *str) {
+       if (config_use_unicode) return wcslen((wchar_t *) ufix(str));
+       else                    return strlen((char *) fix(str));
+ }
+ 
+-inline CHAR_T *xwcscpy(CHAR_T *dst, CHAR_T *src) {
++ CHAR_T *xwcscpy(CHAR_T *dst, CHAR_T *src) {
+       if (config_use_unicode) return (CHAR_T *) wcscpy((wchar_t *) ufix(dst), 
(wchar_t *) ufix(src));
+       else                    return (CHAR *) strcpy((char *) fix(dst), (char 
*) fix(src));
+ }
+ 
+-inline CHAR_T *xwcsdup(CHAR_T *str) {
++ CHAR_T *xwcsdup(CHAR_T *str) {
+       if (!str) return NULL;
+       return xmemdup(str, (xwcslen(str)+1) * sizeof(CHAR_T));
+ }
+ 
+-inline CHAR_T *xwcscat(CHAR_T *dst, const CHAR_T *src) {
++ CHAR_T *xwcscat(CHAR_T *dst, const CHAR_T *src) {
+       if (config_use_unicode) return (CHAR_T *) wcscat((wchar_t *) ufix(dst), 
(wchar_t *) ufix(src));
+       else                    return (CHAR *) strcat((char *) dst, (char *) 
src);
+ }
+ 
+-inline int xwcscmp(const CHAR_T *s1, const CHAR_T *s2) {
++ int xwcscmp(const CHAR_T *s1, const CHAR_T *s2) {
+       if (config_use_unicode) return wcscmp((wchar_t *) ufix(s1), (wchar_t *) 
ufix(s2));
+       else                    return strcmp((char *) fix(s1), (char *) 
fix(s2));
+ }
+ 
+-inline CHAR_T *xwcschr(const CHAR_T *s, CHAR_T c) {
++ CHAR_T *xwcschr(const CHAR_T *s, CHAR_T c) {
+       if (config_use_unicode) return (CHAR_T *) wcschr((wchar_t *) ufix(s), 
(wchar_t) ufix(c));
+       else                    return (CHAR *) strchr((char *) fix(s), (char) 
c);
+ }
+ 
+-inline char *wcs_to_normal(const CHAR_T *str) {
++ char *wcs_to_normal(const CHAR_T *str) {
+       if (!str) return NULL;
+       if (config_use_unicode) {
+               int len         = wcstombs(NULL, (wchar_t *) str,0);
+@@ -88,7 +88,7 @@
+       } else  return (char *) str;
+ }
+ 
+-inline CHAR_T *normal_to_wcs(const char *str) {
++ CHAR_T *normal_to_wcs(const char *str) {
+       if (!str) return NULL;
+       if (config_use_unicode) {
+               int len = mbstowcs(NULL, str, 0)+1;
+@@ -98,7 +98,7 @@
+       } else  return (CHAR_T *) str;
+ }
+ 
+-inline CHAR_T **wcs_array_make(const CHAR_T *string, const CHAR_T *sep, int 
max, int trim, int quotes) {
++ CHAR_T **wcs_array_make(const CHAR_T *string, const CHAR_T *sep, int max, 
int trim, int quotes) {
+       if (config_use_unicode) {
+               char *str = wcs_to_normal(string);
+               char *sp  = wcs_to_normal(sep);
+@@ -120,7 +120,7 @@
+       } else  return (CHAR **) array_make((char *) string, (char *) sep, max, 
trim, quotes);
+ }
+ 
+-inline size_t xwcslcpy(CHAR_T *dst, const CHAR_T *src, size_t size) {
++ size_t xwcslcpy(CHAR_T *dst, const CHAR_T *src, size_t size) {
+       if (config_use_unicode) {
+               /* copied from strlcpy.c (c Piotr Domagalski) */
+               register size_t i, n = size;
+@@ -138,7 +138,7 @@
+       } else return strlcpy((char *) dst, (char *) src, size);
+ }
+ 
+-inline CHAR_T *wcs_array_join(CHAR_T **array, const CHAR_T *sep) {
++ CHAR_T *wcs_array_join(CHAR_T **array, const CHAR_T *sep) {
+       if (config_use_unicode) {
+               char **arr;
+               char *sp = wcs_to_normal(sep);
+--- ekg2-0.1.1/plugins/ncurses/ecurses.h~      2006-12-18 09:21:41.000000000 
+0100
++++ ekg2-0.1.1/plugins/ncurses/ecurses.h       2008-11-19 13:29:39.028100223 
+0100
+@@ -52,33 +52,33 @@
+ 
+ #define __S(str, i) (CHAR_T) (config_use_unicode ? ((wchar_t *) str)[i] : 
((unsigned char *) str)[i]) 
+ 
+-static inline CHAR_T *__SPTR(CHAR_T *str, int offset) { /* #define 
__SPTR(str, i) (CHAR_T *) (config_use_unicode ? &((wchar_t *) str[i]) : 
&((unsigned char *) str)[i]) */
++static  CHAR_T *__SPTR(CHAR_T *str, int offset) { /* #define __SPTR(str, i) 
(CHAR_T *) (config_use_unicode ? &((wchar_t *) str[i]) : &((unsigned char *) 
str)[i]) */
+       if (config_use_unicode) return (CHAR_T *) (str + offset);
+       else                    return (CHAR_T *) (((char *) str) + offset);
+ }
+ 
+-static inline void __SREP(CHAR_T *str, int offset, CHAR_T newchar) {
++static  void __SREP(CHAR_T *str, int offset, CHAR_T newchar) {
+       if (config_use_unicode) (*__SPTR(str, offset)) = newchar;
+       else                    (* ((char *) __SPTR(str, offset))) = newchar;
+ }
+ 
+-static inline CHAR_T *__SN(CHAR_T **str, int offset) { /* #define __SN(str) 
(CHAR_T) (config_use_unicode ? ((wchar_t *) str)++ : ((unsigned char *) str)++) 
*/
++static  CHAR_T *__SN(CHAR_T **str, int offset) { /* #define __SN(str) 
(CHAR_T) (config_use_unicode ? ((wchar_t *) str)++ : ((unsigned char *) str)++) 
*/
+       if (config_use_unicode) return (CHAR_T *) ((*str) += offset);
+       else                    return (CHAR_T *) ((*((char **) str)) += 
offset);
+ }
+ #define free_utf(ptr)  do { if (ptr && config_use_unicode) free(ptr); } 
while(0)
+ 
+-inline int xwcslen(CHAR_T *str);
+-inline CHAR_T *xwcscpy(CHAR_T *dst, CHAR_T *src);
+-inline CHAR_T *xwcsdup(CHAR_T *str);
+-inline CHAR_T *xwcscat(CHAR_T *dst, const CHAR_T *src);
+-inline int xwcscmp(const CHAR_T *s1, const CHAR_T *s2);
+-inline CHAR_T *xwcschr(const CHAR_T *s, CHAR_T c);
+-inline char *wcs_to_normal(const CHAR_T *str);
+-inline CHAR_T *normal_to_wcs(const char *str);
+-inline CHAR_T **wcs_array_make(const CHAR_T *string, const CHAR_T *sep, int 
max, int trim, int quotes);
+-inline CHAR_T *wcs_array_join(CHAR_T **array, const CHAR_T *sep);
+-inline size_t xwcslcpy(CHAR_T *dst, const CHAR_T *src, size_t size);
++ int xwcslen(CHAR_T *str);
++ CHAR_T *xwcscpy(CHAR_T *dst, CHAR_T *src);
++ CHAR_T *xwcsdup(CHAR_T *str);
++ CHAR_T *xwcscat(CHAR_T *dst, const CHAR_T *src);
++ int xwcscmp(const CHAR_T *s1, const CHAR_T *s2);
++ CHAR_T *xwcschr(const CHAR_T *s, CHAR_T c);
++ char *wcs_to_normal(const CHAR_T *str);
++ CHAR_T *normal_to_wcs(const char *str);
++ CHAR_T **wcs_array_make(const CHAR_T *string, const CHAR_T *sep, int max, 
int trim, int quotes);
++ CHAR_T *wcs_array_join(CHAR_T **array, const CHAR_T *sep);
++ size_t xwcslcpy(CHAR_T *dst, const CHAR_T *src, size_t size);
+ 
+ #else /* USE_UNICODE */
+ #define CHAR_T unsigned char
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/ekg2-missing-xwcslen.patch?r1=1.2&r2=1.3&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to