Changeset e19eb97 for global.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, 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)
Message:
Add const qualifiers for char * and void *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r65b2173 re19eb97  
    269269/* buffercommand */
    270270
    271 void owl_global_set_buffercommand(owl_global *g, char *command) {
     271void owl_global_set_buffercommand(owl_global *g, const char *command) {
    272272  owl_editwin_set_command(owl_global_get_typwin(g), command);
    273273}
    274274
    275 char *owl_global_get_buffercommand(owl_global *g) {
     275const char *owl_global_get_buffercommand(owl_global *g) {
    276276  return owl_editwin_get_command(owl_global_get_typwin(g));
    277277}
     
    351351}
    352352
    353 char *owl_global_get_homedir(owl_global *g) {
     353const char *owl_global_get_homedir(owl_global *g) {
    354354  if (g->homedir) return(g->homedir);
    355355  return("/");
    356356}
    357357
    358 char *owl_global_get_confdir(owl_global *g) {
     358const char *owl_global_get_confdir(owl_global *g) {
    359359  if (g->confdir) return(g->confdir);
    360360  return("/");
     
    364364 * Setting this also sets startupfile to confdir/startup
    365365 */
    366 void owl_global_set_confdir(owl_global *g, char *cd) {
     366void owl_global_set_confdir(owl_global *g, const char *cd) {
    367367  free(g->confdir);
    368368  g->confdir = owl_strdup(cd);
     
    371371}
    372372
    373 char *owl_global_get_startupfile(owl_global *g) {
     373const char *owl_global_get_startupfile(owl_global *g) {
    374374  if(g->startupfile) return(g->startupfile);
    375375  return("/");
     
    534534}
    535535
    536 char *owl_global_get_hostname(owl_global *g) {
     536const char *owl_global_get_hostname(owl_global *g) {
    537537  if (g->thishost) return(g->thishost);
    538538  return("");
     
    577577/* startup args */
    578578
    579 void owl_global_set_startupargs(owl_global *g, int argc, char **argv) {
     579void owl_global_set_startupargs(owl_global *g, int argc, const char *const *argv) {
    580580  int i, len;
    581581
     
    595595}
    596596
    597 char *owl_global_get_startupargs(owl_global *g) {
     597const char *owl_global_get_startupargs(owl_global *g) {
    598598  if (g->startupargs) return(g->startupargs);
    599599  return("");
     
    616616}
    617617
    618 owl_filter *owl_global_get_filter(owl_global *g, char *name) {
     618owl_filter *owl_global_get_filter(owl_global *g, const char *name) {
    619619  int i, j;
    620620  owl_filter *f;
     
    634634}
    635635
    636 void owl_global_remove_filter(owl_global *g, char *name) {
     636void owl_global_remove_filter(owl_global *g, const char *name) {
    637637  int i, j;
    638638  owl_filter *f;
     
    741741}
    742742
    743 char *owl_global_get_aim_screenname(owl_global *g)
     743const char *owl_global_get_aim_screenname(owl_global *g)
    744744{
    745745  if (owl_global_is_aimloggedin(g)) {
     
    749749}
    750750
    751 char *owl_global_get_aim_screenname_for_filters(owl_global *g)
     751const char *owl_global_get_aim_screenname_for_filters(owl_global *g)
    752752{
    753753  if (owl_global_is_aimloggedin(g)) {
     
    757757}
    758758
    759 void owl_global_set_aimloggedin(owl_global *g, char *screenname)
     759void owl_global_set_aimloggedin(owl_global *g, const char *screenname)
    760760{
    761761  char *sn_escaped;
    762   char *quote;
     762  const char *quote;
    763763  g->aim_loggedin=1;
    764764  if (g->aim_screenname) owl_free(g->aim_screenname);
     
    843843/* Return the style with name 'name'.  If it does not exist return
    844844 * NULL */
    845 owl_style *owl_global_get_style_by_name(owl_global *g, char *name)
     845owl_style *owl_global_get_style_by_name(owl_global *g, const char *name)
    846846{
    847847  return owl_dict_find_element(&(g->styledict), name);
     
    942942}
    943943
    944 char * owl_global_intern(owl_global *g, char * string)
     944const char * owl_global_intern(owl_global *g, const char * string)
    945945{
    946946  return owl_obarray_insert(&(g->obarray), string);
Note: See TracChangeset for help on using the changeset viewer.