[Pinfo-devel] r141 - pinfo/branches/cxx/src
Nathanael Nerode
neroden-guest at costa.debian.org
Fri Sep 2 07:41:04 UTC 2005
Author: neroden-guest
Date: 2005-09-02 07:41:03 +0000 (Fri, 02 Sep 2005)
New Revision: 141
Modified:
pinfo/branches/cxx/src/utils.cxx
pinfo/branches/cxx/src/utils.h
Log:
constify some char* in utils.cxx.
Modified: pinfo/branches/cxx/src/utils.cxx
===================================================================
--- pinfo/branches/cxx/src/utils.cxx 2005-09-02 07:31:26 UTC (rev 140)
+++ pinfo/branches/cxx/src/utils.cxx 2005-09-02 07:41:03 UTC (rev 141)
@@ -249,7 +249,7 @@
}
char *
-getstring(char *prompt)
+getstring(const char *prompt)
{
char *buf;
@@ -403,7 +403,7 @@
/* returns 0 on success, 1 on error */
int
-pinfo_re_comp(char *name)
+pinfo_re_comp(const char *name)
{
#ifdef ___DONT_USE_REGEXP_SEARCH___
if (pinfo_re_pattern)
@@ -431,7 +431,7 @@
}
int
-pinfo_re_exec(char *name)
+pinfo_re_exec(const char *name)
{
#ifdef ___DONT_USE_REGEXP_SEARCH___
char *found;
@@ -450,10 +450,10 @@
}
int
-yesno(char *prompt, int def)
+yesno(const char *prompt, int def)
{
- char *yes = _("yes");
- char *no = _("no");
+ const char *yes = _("yes");
+ const char *no = _("no");
int key;
attrset(bottomline);
Modified: pinfo/branches/cxx/src/utils.h
===================================================================
--- pinfo/branches/cxx/src/utils.h 2005-09-02 07:31:26 UTC (rev 140)
+++ pinfo/branches/cxx/src/utils.h 2005-09-02 07:41:03 UTC (rev 141)
@@ -38,8 +38,8 @@
#endif
/* wrappers for re_comp and re_exec */
-int pinfo_re_comp (char *name);
-int pinfo_re_exec (char *name);
+int pinfo_re_comp (const char *name);
+int pinfo_re_exec (const char *name);
/* user defined getch, capable of handling ALT keybindings */
int pinfo_getch ();
@@ -58,7 +58,7 @@
/* initializes curses interface */
void init_curses ();
/* an interface to gnu readline */
-char *getstring (char *prompt);
+char *getstring (const char *prompt);
/* for some reasons mvhline does not work quite properly... */
void mymvhline (int y, int x, char ch, int len);
/* this one supports color back/foreground */
@@ -74,7 +74,7 @@
int gettagtablepos (std::string node);
/* handle localized `(y/n)' dialog box. */
-int yesno (char *prompt, int def);
+int yesno (const char *prompt, int def);
/* copies the first part of string, which is without regexp */
void copy_stripped_from_regexp (char *src, char *dest);
More information about the Pinfo-devel
mailing list