# HG changeset patch # User David A. Holland # Date 1434092584 14400 # Node ID 6119608a9817b516722adfb39ecf770482442d2a # Parent a2f047301c15a6b1754168a55288ef7c566af2b7 Finish joerg's halfassedly partial const changes. (why only do half of it?) diff -r a2f047301c15 -r 6119608a9817 macro.c --- a/macro.c Fri Jun 12 02:55:02 2015 -0400 +++ b/macro.c Fri Jun 12 03:03:04 2015 -0400 @@ -677,7 +677,7 @@ static struct expstate mainstate; static void doexpand(struct expstate *es, struct place *p, - char *buf, size_t len); + const char *buf, size_t len); static void @@ -921,7 +921,8 @@ static void -expand_got_ws(struct expstate *es, struct place *p, const char *buf, size_t len) +expand_got_ws(struct expstate *es, struct place *p, + const char *buf, size_t len) { switch (es->state) { case ES_NORMAL: @@ -943,7 +944,8 @@ static void -expand_got_word(struct expstate *es, struct place *p, char *buf, size_t len) +expand_got_word(struct expstate *es, struct place *p, + const char *buf, size_t len) { struct macro *m; @@ -992,7 +994,8 @@ static void -expand_got_lparen(struct expstate *es, struct place *p, char *buf, size_t len) +expand_got_lparen(struct expstate *es, struct place *p, + const char *buf, size_t len) { switch (es->state) { case ES_NORMAL: @@ -1015,7 +1018,8 @@ static void -expand_got_rparen(struct expstate *es, struct place *p, char *buf, size_t len) +expand_got_rparen(struct expstate *es, struct place *p, + const char *buf, size_t len) { switch (es->state) { case ES_NORMAL: @@ -1050,7 +1054,8 @@ static void -expand_got_comma(struct expstate *es, struct place *p, char *buf, size_t len) +expand_got_comma(struct expstate *es, struct place *p, + const char *buf, size_t len) { switch (es->state) { case ES_NORMAL: @@ -1078,7 +1083,8 @@ static void -expand_got_other(struct expstate *es, struct place *p, char *buf, size_t len) +expand_got_other(struct expstate *es, struct place *p, + const char *buf, size_t len) { switch (es->state) { case ES_NORMAL: @@ -1130,7 +1136,7 @@ static void -doexpand(struct expstate *es, struct place *p, char *buf, size_t len) +doexpand(struct expstate *es, struct place *p, const char *buf, size_t len) { char *s; size_t x; @@ -1219,7 +1225,7 @@ } char * -macroexpand(struct place *p, char *buf, size_t len, bool honordefined) +macroexpand(struct place *p, const char *buf, size_t len, bool honordefined) { struct expstate es; char *ret; @@ -1241,7 +1247,7 @@ } void -macro_sendline(struct place *p, char *buf, size_t len) +macro_sendline(struct place *p, const char *buf, size_t len) { doexpand(&mainstate, p, buf, len); switch (mainstate.state) { diff -r a2f047301c15 -r 6119608a9817 macro.h --- a/macro.h Fri Jun 12 02:55:02 2015 -0400 +++ b/macro.h Fri Jun 12 03:03:04 2015 -0400 @@ -44,7 +44,8 @@ void macro_undef(const char *macro); bool macro_isdefined(const char *macro); -char *macroexpand(struct place *, char *buf, size_t len, bool honordefined); +char *macroexpand(struct place *, const char *buf, size_t len, + bool honordefined); -void macro_sendline(struct place *, char *buf, size_t len); +void macro_sendline(struct place *, const char *buf, size_t len); void macro_sendeof(struct place *);