Changeset 3f8514b


Ignore:
Timestamp:
Aug 15, 2009, 7:08:19 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0a0fb74
Parents:
ff7e289
git-author:
Anders Kaseorg <andersk@mit.edu> (07/22/09 03:07:36)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:19)
Message:
Add const qualifiers for owl_context *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    rff7e289 r3f8514b  
    6565}
    6666
    67 char *_owl_cmddict_execute(const owl_cmddict *cd, owl_context *ctx, const char *const *argv, int argc, const char *buff) {
     67char *_owl_cmddict_execute(const owl_cmddict *cd, const owl_context *ctx, const char *const *argv, int argc, const char *buff) {
    6868  char *retval = NULL;
    6969  owl_cmd *cmd;
     
    7878}
    7979
    80 char *owl_cmddict_execute(const owl_cmddict *cd, owl_context *ctx, const char *cmdbuff) {
     80char *owl_cmddict_execute(const owl_cmddict *cd, const owl_context *ctx, const char *cmdbuff) {
    8181  char **argv;
    8282  int argc;
     
    103103}
    104104
    105 char *owl_cmddict_execute_argv(const owl_cmddict *cd, owl_context *ctx, const char *const *argv, int argc) {
     105char *owl_cmddict_execute_argv(const owl_cmddict *cd, const owl_context *ctx, const char *const *argv, int argc) {
    106106  char *buff, *ptr;
    107107  int len = 0, i;
     
    162162}
    163163
    164 int owl_cmd_is_context_valid(owl_cmd *cmd, owl_context *ctx) {
     164int owl_cmd_is_context_valid(owl_cmd *cmd, const owl_context *ctx) {
    165165  if (owl_context_matches(ctx, cmd->validctx)) return 1;
    166166  else return 0;
    167167}
    168168
    169 char *owl_cmd_execute(owl_cmd *cmd, const owl_cmddict *cd, owl_context *ctx, int argc, const char *const *argv, const char *cmdbuff) {
     169char *owl_cmd_execute(owl_cmd *cmd, const owl_cmddict *cd, const owl_context *ctx, int argc, const char *const *argv, const char *cmdbuff) {
    170170  static int alias_recurse_depth = 0;
    171171  int ival=0;
  • context.c

    r4d86e06 r3f8514b  
    1414
    1515/* returns whether test matches the current context */
    16 int owl_context_matches(owl_context *ctx, int test)
     16int owl_context_matches(const owl_context *ctx, int test)
    1717{
    1818  /*owl_function_debugmsg(", current: 0x%04x test: 0x%04x\n", ctx->mode, test);*/
     
    2828}
    2929
    30 void *owl_context_get_data(owl_context *ctx)
     30void *owl_context_get_data(const owl_context *ctx)
    3131{
    3232  return ctx->data;
    3333}
    3434
    35 int owl_context_get_mode(owl_context *ctx)
     35int owl_context_get_mode(const owl_context *ctx)
    3636{
    3737  return ctx->mode & OWL_CTX_MODE_BITS;
    3838}
    3939
    40 int owl_context_get_active(owl_context *ctx)
     40int owl_context_get_active(const owl_context *ctx)
    4141{
    4242  return ctx->mode & OWL_CTX_ACTIVE_BITS;
    4343}
    4444
    45 int owl_context_is_startup(owl_context *ctx)
     45int owl_context_is_startup(const owl_context *ctx)
    4646{
    4747  return (ctx->mode & OWL_CTX_STARTUP)?1:0;
    4848}
    4949
    50 int owl_context_is_interactive(owl_context *ctx)
     50int owl_context_is_interactive(const owl_context *ctx)
    5151{
    5252  return(ctx->mode & OWL_CTX_INTERACTIVE)?1:0;
Note: See TracChangeset for help on using the changeset viewer.