Changeset a000878c in mainline for uspace/app/bdsh/cmds/cmds.h


Ignore:
Timestamp:
2010-02-25T19:11:25Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
958de16
Parents:
a634485
Message:

make sure that all statically allocated strings are declared as "const char *"
and are treated as read-only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/cmds.h

    ra634485 ra000878c  
    3333/* Module structure */
    3434typedef struct {
    35         char *name;         /* Name of the command */
    36         char *desc;         /* Description of the command */
     35        const char *name;   /* Name of the command */
     36        const char *desc;   /* Description of the command */
    3737        mod_entry_t entry;  /* Command (exec) entry function */
    3838        mod_help_t help;    /* Command (help) entry function */
     
    4141/* Builtin structure, same as modules except different types of entry points */
    4242typedef struct {
    43         char *name;
    44         char *desc;
     43        const char *name;
     44        const char *desc;
    4545        builtin_entry_t entry;
    4646        builtin_help_t help;
     
    5757extern int is_module(const char *);
    5858extern int is_module_alias(const char *);
    59 extern char * alias_for_module(const char *);
     59extern char *alias_for_module(const char *);
    6060extern int help_module(int, unsigned int);
    6161extern int run_module(int, char *[]);
     
    6565extern int is_builtin(const char *);
    6666extern int is_builtin_alias(const char *);
    67 extern char * alias_for_builtin(const char *);
     67extern char *alias_for_builtin(const char *);
    6868extern int help_builtin(int, unsigned int);
    6969extern int run_builtin(int, char *[], cliuser_t *);
Note: See TracChangeset for help on using the changeset viewer.