- Timestamp:
- Aug 15, 2009, 7:08:18 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 1077891a
- Parents:
- fa4562c
- git-author:
- Anders Kaseorg <andersk@mit.edu> (08/04/09 02:37:51)
- git-committer:
- Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
util.c
rfa4562c re19eb97 6 6 #include <pwd.h> 7 7 8 void sepbar(c har *in)8 void sepbar(const char *in) 9 9 { 10 10 char buff[1024]; … … 13 13 owl_view *v; 14 14 int x, y, i; 15 c har *foo, *appendtosepbar;15 const char *foo, *appendtosepbar; 16 16 17 17 sepwin=owl_global_get_curs_sepwin(&g); … … 125 125 } 126 126 127 char **atokenize(c har *buffer,char *sep, int *i)127 char **atokenize(const char *buffer, const char *sep, int *i) 128 128 { 129 129 /* each element of return must be freed by user */ … … 157 157 } 158 158 159 c har *skiptokens(char *buff, int n) {159 const char *skiptokens(const char *buff, int n) { 160 160 /* skips n tokens and returns where that would be. 161 161 * TODO: handle quotes more sanely. */ … … 177 177 * duplicate slashes are removed. Caller must free the return. 178 178 */ 179 char *owl_util_makepath(c har *in)179 char *owl_util_makepath(const char *in) 180 180 { 181 181 int i, j, x; … … 262 262 } 263 263 264 char **owl_parseline(c har *line, int *argc)264 char **owl_parseline(const char *line, int *argc) 265 265 { 266 266 /* break a command line up into argv, argc. The caller must free … … 409 409 * if the named color is not available 410 410 */ 411 int owl_util_string_to_color(c har *color)411 int owl_util_string_to_color(const char *color) 412 412 { 413 413 int c; … … 439 439 440 440 /* Return a string name of the given owl color */ 441 c har *owl_util_color_to_string(int color)441 const char *owl_util_color_to_string(int color) 442 442 { 443 443 if (color==OWL_COLOR_BLACK) return("black"); … … 456 456 char *owl_util_get_default_tty() 457 457 { 458 c har *tmp;458 const char *tmp; 459 459 char *out; 460 460 … … 480 480 owl_message *m; 481 481 owl_fmtext *fm; 482 c har *text, *ptr;482 const char *text, *ptr; 483 483 int place; 484 484 … … 532 532 * return. 533 533 */ 534 char *owl_util_stripnewlines(c har *in)534 char *owl_util_stripnewlines(const char *in) 535 535 { 536 536 … … 558 558 * memory. 559 559 */ 560 void owl_util_file_deleteline(c har *filename,char *line, int backup)560 void owl_util_file_deleteline(const char *filename, const char *line, int backup) 561 561 { 562 562 char buff[LINE], *text; … … 646 646 The caller is responsible for freeing the allocated string. 647 647 */ 648 char * owl_util_baseclass(c har * class)648 char * owl_util_baseclass(const char * class) 649 649 { 650 650 char *start, *end; … … 664 664 } 665 665 666 c har * owl_get_datadir()667 { 668 c har * datadir = getenv("BARNOWL_DATA_DIR");666 const char * owl_get_datadir() 667 { 668 const char * datadir = getenv("BARNOWL_DATA_DIR"); 669 669 if(datadir != NULL) 670 670 return datadir;
Note: See TracChangeset
for help on using the changeset viewer.