@@ -38,9 +38,9 @@ const phpdbg_command_t phpdbg_help_commands[] = {
38
38
}; /* }}} */
39
39
40
40
/* {{{ pretty_print. Formatting escapes and wrapping text in a string before printing it. */
41
- void pretty_print (char * text )
41
+ static void pretty_print (const char * text )
42
42
{
43
- char * new , * p , * q ;
43
+ char * new , * q ;
44
44
45
45
const char * prompt_escape = phpdbg_get_prompt ();
46
46
size_t prompt_escape_len = strlen (prompt_escape );
@@ -60,6 +60,7 @@ void pretty_print(char *text)
60
60
uint32_t line_count = 0 ; /* number printable chars on current line */
61
61
62
62
/* First pass calculates a safe size for the pretty print version */
63
+ const char * p ;
63
64
for (p = text ; * p ; p ++ ) {
64
65
if (UNEXPECTED (p [0 ] == '*' ) && p [1 ] == '*' ) {
65
66
size += bold_escape_len - 2 ;
@@ -143,9 +144,9 @@ void summary_print(phpdbg_command_t const * const cmd)
143
144
}
144
145
145
146
/* {{{ get_help. Retries and formats text from the phpdbg help text table */
146
- static char * get_help (const char * const key )
147
+ static const char * get_help (const char * const key )
147
148
{
148
- phpdbg_help_text_t * p ;
149
+ const phpdbg_help_text_t * p ;
149
150
150
151
/* Note that phpdbg_help_text is not assumed to be collated in key order. This is an
151
152
inconvenience that means that help can't be logically grouped Not worth
@@ -201,8 +202,8 @@ static int get_command(
201
202
202
203
} /* }}} */
203
204
204
- void phpdbg_do_help_cmd (char * type ) { /* {{{ */
205
- char * help ;
205
+ void phpdbg_do_help_cmd (const char * type ) { /* {{{ */
206
+ const char * help ;
206
207
207
208
if (!type ) {
208
209
pretty_print (get_help ("overview!" ));
@@ -329,7 +330,7 @@ PHPDBG_HELP(aliases) /* {{{ */
329
330
* has a key ending in !
330
331
*/
331
332
#define CR "\n"
332
- phpdbg_help_text_t phpdbg_help_text [] = {
333
+ const phpdbg_help_text_t phpdbg_help_text [] = {
333
334
334
335
/******************************** General Help Topics ********************************/
335
336
{"overview!" , CR
0 commit comments