Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 235619 Details for
Bug 324353
Stabilize =app-editors/hteditor-2.0.18
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to solve the constants problem
hte_consts.patch (text/plain), 6.59 KB, created by
Francisco Blas Izquierdo Riera (RETIRED)
on 2010-06-16 17:37:20 UTC
(
hide
)
Description:
Patch to solve the constants problem
Filename:
MIME Type:
Creator:
Francisco Blas Izquierdo Riera (RETIRED)
Created:
2010-06-16 17:37:20 UTC
Size:
6.59 KB
patch
obsolete
>diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/htapp.cc /tmp/ht-2.0.10/htapp.cc >--- ht-2.0.10/htapp.cc 2007-06-20 01:22:53.000000000 +0200 >+++ /tmp/ht-2.0.10/htapp.cc 2010-06-16 19:16:03.000000000 +0200 >@@ -2959,7 +2959,7 @@ > LOG("%s: invalid filename", filename); > return; > } >- char *suf = sys_filename_suffix(fn); >+ const char *suf = sys_filename_suffix(fn); > /* append HT project file suffix if not already there */ > if (!(suf && (strcmp(suf, HT_PROJECT_CONFIG_SUFFIX+1)==0))) { > strcat(fn, HT_PROJECT_CONFIG_SUFFIX); >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/htformat.cc /tmp/ht-2.0.10/htformat.cc >--- ht-2.0.10/htformat.cc 2007-06-20 00:42:32.000000000 +0200 >+++ /tmp/ht-2.0.10/htformat.cc 2010-06-16 19:18:18.000000000 +0200 >@@ -3891,7 +3891,7 @@ > void ht_uformat_viewer::update_visual_info() > { > cursorline_get(); >- char *s, *t = cursor_line; >+ const char *s, *t = cursor_line; > int v = 0, vl = 0; > int i = 0, g = 0; > while ((s=tag_findnext(t))) { >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/htreg.cc /tmp/ht-2.0.10/htreg.cc >--- ht-2.0.10/htreg.cc 2007-06-19 17:41:58.000000000 +0200 >+++ /tmp/ht-2.0.10/htreg.cc 2010-06-16 19:16:56.000000000 +0200 >@@ -781,7 +781,7 @@ > ht_registry_node *ht_registry::find_entry_i(Container **rdir, const char *key, bool follow_symlinks) > { > ht_registry_node *dir = root; >- char *s; >+ const char *s; > char t[256]; /* FIXME: possible buffer overflow */ > if (key[0]=='/') key++; > while (1) { >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/httag.cc /tmp/ht-2.0.10/httag.cc >--- ht-2.0.10/httag.cc 2007-06-19 17:41:58.000000000 +0200 >+++ /tmp/ht-2.0.10/httag.cc 2010-06-16 19:17:35.000000000 +0200 >@@ -524,7 +524,7 @@ > *tag_str = 0; > } > >-TAGSTRING *tag_findnext(const TAGSTRING *tagstring) >+const TAGSTRING *tag_findnext(const TAGSTRING *tagstring) > { > return strchr(tagstring, '\e'); > } >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/httag.h /tmp/ht-2.0.10/httag.h >--- ht-2.0.10/httag.h 2007-06-19 17:41:58.000000000 +0200 >+++ /tmp/ht-2.0.10/httag.h 2010-06-16 19:17:50.000000000 +0200 >@@ -447,7 +447,7 @@ > > void statictag_to_tag(const char *statictag_str, TAGSTRING *tag_str, int maxlen, uint64 relocation, bool std_bigendian); > >-TAGSTRING *tag_findnext(const TAGSTRING *tagstring); >+const TAGSTRING *tag_findnext(const TAGSTRING *tagstring); > > vcp tag_get_color(const TAGSTRING *tagstring); > void tag_get_id(const TAGSTRING *tagstring, uint32 *id128_1, uint32 *id128_2, uint32 *id128_3, uint32 *id128_4); >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/httext.cc /tmp/ht-2.0.10/httext.cc >--- ht-2.0.10/httext.cc 2007-06-19 17:41:58.000000000 +0200 >+++ /tmp/ht-2.0.10/httext.cc 2010-06-16 19:19:47.000000000 +0200 >@@ -103,7 +103,7 @@ > */ > > /* FIXME: put it somewhere else..., why ain't this a POSIX function ? */ >-void *memrchr(const void *string, int ch, size_t num) >+const void *memrchr(const void *string, int ch, size_t num) > { > while (num--) { > if (((char*)string)[num]==ch) return ((char*)string)+num; >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/info/infoview.cc /tmp/ht-2.0.10/info/infoview.cc >--- ht-2.0.10/info/infoview.cc 2007-04-30 12:37:33.000000000 +0200 >+++ /tmp/ht-2.0.10/info/infoview.cc 2010-06-16 19:12:04.000000000 +0200 >@@ -193,7 +193,7 @@ > } else { > fallback: > if (k && k > n) { >- char *cr = strchr(n, '\n'); >+ const char *cr = strchr(n, '\n'); > if (cr && cr < k) k = cr; > if (k-n == 0) goto fallback2; > fl->write(n, k-n); >@@ -423,11 +423,11 @@ > const char *tags[] = {"File", "Node", "Prev", "Next", "Up"}; > #define NUM_NODE_TAGS (sizeof (tags) / sizeof (tags[0])) > const char *s = infotext; >- char *firstnode = NULL; >+ const char *firstnode = NULL; > while ((s=strchr(s, 0x1f))) { > s++; > while ((*s>0) && (*s<32)) s++; >- char *cr = strchr(s, '\n'); >+ const char *cr = strchr(s, '\n'); > if (cr) { > while (*s && (s<cr)) { > whitespaces(s); >@@ -437,7 +437,7 @@ > if (ht_strncmp(s, tags[i], l) == 0 && s[l] == ':') { > s += l+1; > whitespaces(s); >- char *e = strchr(s, ','); >+ const char *e = strchr(s, ','); > if (!e || (e>cr)) e = cr; > if (!firstnode && (strcmp(tags[i], "Node") == 0)) { > firstnode = cr+1; >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/io/file.cc /tmp/ht-2.0.10/io/file.cc >--- ht-2.0.10/io/file.cc 2007-04-30 12:43:29.000000000 +0200 >+++ /tmp/ht-2.0.10/io/file.cc 2010-06-16 19:14:31.000000000 +0200 >@@ -128,9 +128,9 @@ > int sys_basename(char *result, const char *filename) > { > // FIXME: use is_path_delim >- char *slash1 = strrchr(filename, '/'); >- char *slash2 = strrchr(filename, '\\'); >- char *slash = (slash1 > slash2) ? slash1 : slash2; >+ const char *slash1 = strrchr(filename, '/'); >+ const char *slash2 = strrchr(filename, '\\'); >+ const char *slash = (slash1 > slash2) ? slash1 : slash2; > if (slash) { > int l = strlen(filename); > ht_strlcpy(result, slash+1, l-(slash-filename)+1); >@@ -143,9 +143,9 @@ > int sys_dirname(char *result, const char *filename) > { > // FIXME: use is_path_delim >- char *slash1 = strrchr(filename, '/'); >- char *slash2 = strrchr(filename, '\\'); >- char *slash = (slash1 > slash2) ? slash1 : slash2; >+ const char *slash1 = strrchr(filename, '/'); >+ const char *slash2 = strrchr(filename, '\\'); >+ const char *slash = (slash1 > slash2) ? slash1 : slash2; > if (slash) { > ht_strlcpy(result, filename, slash-filename+1); > return 0; >@@ -263,14 +263,14 @@ > return (k == 0) ? 0 : EINVAL; > } > >-char *sys_filename_suffix(const char *fn) >+const char *sys_filename_suffix(const char *fn) > { > const char *s = NULL; > while (fn && *fn) { > if (sys_is_path_delim(*fn)) s = fn+1; > fn++; > } >- char *p = s ? strrchr(s, '.') : NULL; >+ const char *p = s ? strrchr(s, '.') : NULL; > return p ? p+1 : NULL; > } > >diff -r -u --exclude='*.Po' --exclude='*.o' --exclude='*.a' --exclude='*.log' ht-2.0.10/io/file.h /tmp/ht-2.0.10/io/file.h >--- ht-2.0.10/io/file.h 2007-04-30 12:43:29.000000000 +0200 >+++ /tmp/ht-2.0.10/io/file.h 2010-06-16 19:15:00.000000000 +0200 >@@ -151,7 +151,7 @@ > int sys_dirname(char *result, const char *filename); > int sys_relname(char *result, const char *filename, const char *cwd); > int sys_common_canonicalize(char *result, const char *in_name, const char *cwd, is_path_delim delim); >-char * sys_filename_suffix(const char *fn); >+const char * sys_filename_suffix(const char *fn); > int sys_tmpfile_fd(); > > /* system-dependant (implementation in $MYSYSTEM/ *.cc) */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 324353
:
235619