dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / browser.c
index 3ed1716a59be0d7e2b9e440de2b51c105fedf7fe..94fb735be79cd99a6063a1f1810fa1b5c356903c 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /* $TOG: browser.c /main/10 1999/02/23 09:42:01 mgreess $ */
 /*
  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
@@ -354,7 +376,7 @@ make_browser(Calendar *c)
         * remember - this returns a RowColumn widget!
         */
        b->gotomenu = XmVaCreateSimpleOptionMenu(b->upper_form,
-                "goToOptionMenu", goto_label, NULL, 0, gotomenu_cb,
+                "goToOptionMenu", goto_label, 0, 0, gotomenu_cb,
                 XmVaPUSHBUTTON, prev_week, NULL, NULL, NULL,
                 XmVaPUSHBUTTON, this_week, NULL, NULL, NULL,
                 XmVaPUSHBUTTON, next_week, NULL, NULL, NULL,
@@ -727,7 +749,7 @@ void mb_update_busystatus(Browser *b, Calendar *c)
 
                if (bd->cache == NULL) {
                        setup_range(&range_attrs, &ops, &r_cnt, start, stop, 
-                                       CSA_TYPE_EVENT, NULL, B_FALSE, bd->version);
+                                       CSA_TYPE_EVENT, 0, B_FALSE, bd->version);
                        stat = csa_list_entries(bd->cal_handle, r_cnt, range_attrs, ops, &num_entries, &entries, NULL);
                                free_range(&range_attrs, &ops, r_cnt);
                        backend_err_msg(b->frame, bd->name, stat,
@@ -862,7 +884,7 @@ get_mail_address_list(Calendar *c) {
        }
 
        address = calloc(address_len+1, 1);
-       address[0] = NULL;
+       address[0] = '\0';
 
        for (i = 0; i < pos_cnt; i++) {
                bd = (BlistData *)CmDataListGetData(bl->blist_data,
@@ -950,7 +972,7 @@ nt */
 static void
 gotomenu_cb(Widget w, XtPointer data, XtPointer cbs) 
 {
-       int     item_no = (int) data;
+       int     item_no = (int) (intptr_t) data;
        /* should really be getting this from the widget */
        Calendar *c = calendar;
 
@@ -1039,7 +1061,7 @@ mb_update_array(char *entry_text, Calendar *c)
        if (bd->cache == NULL) {
                setup_range(&range_attrs, &ops, &r_cnt, start, 
                        stop, CSA_TYPE_EVENT,
-                       NULL, B_FALSE, bd->version);
+                       0, B_FALSE, bd->version);
                stat = csa_list_entries(bd->cal_handle, r_cnt, range_attrs, 
                                        ops, &num_entries, &entries, NULL);
                free_range(&range_attrs, &ops, r_cnt);
@@ -1194,7 +1216,7 @@ mb_deregister_names(char *name, Calendar *c)
                        backend_err_msg(b->frame, bd->name, stat,
                                        p->xm_error_pixmap);
                }
-               bd->cal_handle = NULL;
+               bd->cal_handle = '\0';
                blist_clean(bl, False);
         }
 }