+/*
+ * 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
+ */
/*******************************************************************************
**
** monthglance.c
#define XOS_USE_XT_LOCKING
#define X_INCLUDE_TIME_H
+#if defined(linux)
+#undef SVR4
+#endif
#include <X11/Xos_r.h>
static void paint_day_entries(Tick, int, int, int, int,
w - pad_width,
buf, pf);
if (cm_strlen(buf) > maxchars)
- buf[maxchars] = NULL;
+ buf[maxchars] = '\0';
(void)gr_text(xc, x + pad_width,
y, pf, buf, rect);
} else {
maxchars = gr_nchars(w, buf,
pf);
if (cm_strlen(buf) > maxchars)
- buf[maxchars] = NULL;
+ buf[maxchars] = '\0';
(void)gr_text(xc, x, y, pf,
buf, rect);
}
start = (time_t) lowerbound(day);
stop = (time_t) last_dom(day);
setup_range(&range_attrs, &ops, &j, start, stop, CSA_TYPE_EVENT,
- NULL, B_FALSE, c->general->version);
+ 0, B_FALSE, c->general->version);
csa_list_entries(c->cal_handle, j, range_attrs, ops, &a_total, &list, NULL);
free_range(&range_attrs, &ops, j);
_Xltimeparams localtime_buf;
_csa_iso8601_to_tick(appt->time->value->item.date_time_value, &start_tick);
- buf[0] = NULL;
+ buf[0] = '\0';
if (appt==NULL || !showtime_set(appt) || magic_time(start_tick))
return;
start = (time_t) lowerbound (day);
stop = (time_t) next_ndays(day, 1) - 1;
setup_range(&range_attrs, &ops, &j, start, stop,
- CSA_TYPE_EVENT, NULL, B_FALSE,
+ CSA_TYPE_EVENT, 0, B_FALSE,
c->general->version);
csa_list_entries(c->cal_handle, j, range_attrs, ops,
&a_total, &list, NULL);
lo_hour = (time_t)lowerbound (day);
hi_hour = (time_t) next_ndays(day, 1) - 1;
setup_range(&range_attrs, &ops, &j, lo_hour, hi_hour,
- CSA_TYPE_EVENT, NULL, B_FALSE, c->general->version);
+ CSA_TYPE_EVENT, 0, B_FALSE, c->general->version);
csa_list_entries(c->cal_handle, j, range_attrs,
ops, &a_total, &list, NULL);
free_range(&range_attrs, &ops, j);
quick_button_cb(Widget widget, XtPointer client, XtPointer call)
{
Calendar *c = calendar;
- int dom = (int) client;
+ int dom = (int) (intptr_t) client;
c->view->olddate = c->view->date;
c->view->date = next_ndays(first_dom(c->view->date), dom);
XmCreatePushButton(c->canvas, buf, NULL, 0);
XtVaSetValues(m->hot_button[n], XmNlabelString, str, NULL);
XtAddCallback(m->hot_button[n],XmNactivateCallback,
- quick_button_cb, (XtPointer)n);
+ quick_button_cb, (XtPointer) (intptr_t) n);
XmStringFree(str);
}
}