diff options
| author | Andreas Schwab | 2010-07-11 11:27:13 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2010-07-11 11:27:13 +0200 |
| commit | a8fe7202b4d4b86cdc66997dc624a367631abd51 (patch) | |
| tree | b53c886cc1a66869d5b01d79384d8241a0a5cefa /src/callproc.c | |
| parent | bb8e180f2ce13346ee082b35d557d244e73f281c (diff) | |
| download | emacs-a8fe7202b4d4b86cdc66997dc624a367631abd51.tar.gz emacs-a8fe7202b4d4b86cdc66997dc624a367631abd51.zip | |
Constify functions taking char *
* alloc.c (pending_malloc_warning, malloc_warning): Add const.
* callproc.c (relocate_fd, getenv_internal_1, getenv_internal)
(egetenv): Likewise.
* doprnt.c (doprnt): Likewise.
* editfns.c (set_time_zone_rule, format2): Likewise.
* emacs.c (decode_env_path): Likewise.
* eval.c (signal_error, error): Likewise.
* insdel.c (replace_range_2): Likewise.
* keyboard.c (cmd_error_internal): Likewise.
* lread.c (isfloat_string, make_symbol, dir_warning): Likewise.
* print.c (write_string, write_string_1, print_error_message):
Likewise.
* vm-limit.c (warn_function, memory_warnings): Likewise.
* xdisp.c (message1, message1_nolog, message_with_string)
(vmessage, message, message_nolog): Likewise.
* emacs.c: Remove duplicate declaration.
* keyboard.h: Likewise.
* lisp.h: Update prototypes.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/callproc.c b/src/callproc.c index 674243f50de..e78d1a9aeaa 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1291,9 +1291,9 @@ relocate_fd (int fd, int minfd) | |||
| 1291 | int new = dup (fd); | 1291 | int new = dup (fd); |
| 1292 | if (new == -1) | 1292 | if (new == -1) |
| 1293 | { | 1293 | { |
| 1294 | char *message1 = "Error while setting up child: "; | 1294 | const char *message1 = "Error while setting up child: "; |
| 1295 | char *errmessage = strerror (errno); | 1295 | const char *errmessage = strerror (errno); |
| 1296 | char *message2 = "\n"; | 1296 | const char *message2 = "\n"; |
| 1297 | emacs_write (2, message1, strlen (message1)); | 1297 | emacs_write (2, message1, strlen (message1)); |
| 1298 | emacs_write (2, errmessage, strlen (errmessage)); | 1298 | emacs_write (2, errmessage, strlen (errmessage)); |
| 1299 | emacs_write (2, message2, strlen (message2)); | 1299 | emacs_write (2, message2, strlen (message2)); |
| @@ -1308,7 +1308,8 @@ relocate_fd (int fd, int minfd) | |||
| 1308 | } | 1308 | } |
| 1309 | 1309 | ||
| 1310 | static int | 1310 | static int |
| 1311 | getenv_internal_1 (char *var, int varlen, char **value, int *valuelen, Lisp_Object env) | 1311 | getenv_internal_1 (const char *var, int varlen, char **value, int *valuelen, |
| 1312 | Lisp_Object env) | ||
| 1312 | { | 1313 | { |
| 1313 | for (; CONSP (env); env = XCDR (env)) | 1314 | for (; CONSP (env); env = XCDR (env)) |
| 1314 | { | 1315 | { |
| @@ -1342,7 +1343,8 @@ getenv_internal_1 (char *var, int varlen, char **value, int *valuelen, Lisp_Obje | |||
| 1342 | } | 1343 | } |
| 1343 | 1344 | ||
| 1344 | static int | 1345 | static int |
| 1345 | getenv_internal (char *var, int varlen, char **value, int *valuelen, Lisp_Object frame) | 1346 | getenv_internal (const char *var, int varlen, char **value, int *valuelen, |
| 1347 | Lisp_Object frame) | ||
| 1346 | { | 1348 | { |
| 1347 | /* Try to find VAR in Vprocess_environment first. */ | 1349 | /* Try to find VAR in Vprocess_environment first. */ |
| 1348 | if (getenv_internal_1 (var, varlen, value, valuelen, | 1350 | if (getenv_internal_1 (var, varlen, value, valuelen, |
| @@ -1403,7 +1405,7 @@ If optional parameter ENV is a list, then search this list instead of | |||
| 1403 | /* A version of getenv that consults the Lisp environment lists, | 1405 | /* A version of getenv that consults the Lisp environment lists, |
| 1404 | easily callable from C. */ | 1406 | easily callable from C. */ |
| 1405 | char * | 1407 | char * |
| 1406 | egetenv (char *var) | 1408 | egetenv (const char *var) |
| 1407 | { | 1409 | { |
| 1408 | char *value; | 1410 | char *value; |
| 1409 | int valuelen; | 1411 | int valuelen; |