char *buf, *ptr;
if (type == TTY_Insert)
- fprintf(stderr, "%s %s",
+ fprintf(stderr, "%s",
catgets(catd, 1, 1042, "Insert Access Denied: "));
else if (type == TTY_Delete)
- fprintf(stderr, "%s %s",
+ fprintf(stderr, "%s",
catgets(catd, 1, 1043, "Delete Access Denied: "));
else
- fprintf(stderr, "%s %s",
+ fprintf(stderr, "%s",
catgets(catd, 1, 1044, "Lookup Access Denied: "));
if (appt_what && appt_what[0] != '\0') {
fprintf(stdout, catgets(catd_global, 1, 1047,
"This appointment: '%s' has an end\n"), what_str);
else
- fprintf(stdout, catgets(catd_global, 1, 1048,
+ fprintf(stdout, "%s", catgets(catd_global, 1, 1048,
"This appointment has an end\n"));
- fprintf(stdout, catgets(catd_global, 1, 1049,
+ fprintf(stdout, "%s", catgets(catd_global, 1, 1049,
"time earlier than its begin time. Do you\n"));
- fprintf(stdout, catgets(catd_global, 1, 1050,
+ fprintf(stdout, "%s", catgets(catd_global, 1, 1050,
"want to schedule it into the next day? [Y/N] "));
fgets(ans, sizeof(ans)-1, stdin);
fprintf(stdout, "\n");
fprintf(stdout, catgets(catd, 1, 1051,
"The appointment '%s' is part of a repeating series. "),
appt->what->value->item.string_value);
- fprintf(stdout, catgets(catd, 1, 1052, "Do you want to:"));
- fprintf(stdout, catgets(catd, 1, 1053,
+ fprintf(stdout, "%s", catgets(catd, 1, 1052, "Do you want to:"));
+ fprintf(stdout, "%s", catgets(catd, 1, 1053,
"\n\t1. Delete all of them"));
- fprintf(stdout, catgets(catd, 1, 1054,
+ fprintf(stdout, "%s", catgets(catd, 1, 1054,
"\n\t2. Delete this one only"));
- fprintf(stdout, catgets(catd, 1, 1055, "\n\t3. Delete forward"));
- fprintf(stdout, catgets(catd, 1, 1056, "\n\t4. Cancel"));
- fprintf(stdout, catgets(catd, 1, 1057, "\n\tOption [1-4]: "));
+ fprintf(stdout, "%s", catgets(catd, 1, 1055, "\n\t3. Delete forward"));
+ fprintf(stdout, "%s", catgets(catd, 1, 1056, "\n\t4. Cancel"));
+ fprintf(stdout, "%s", catgets(catd, 1, 1057, "\n\tOption [1-4]: "));
fgets(ans, sizeof(ans)-1, stdin);
fprintf(stdout, "\n");
}
for (i = 0; i < appt->count; i++) {
if (appt->attrs[i].value->type == CSA_VALUE_REMINDER) {
if ((appt->attrs[i].value->item.reminder_value->lead_time == NULL) ||
- (appt->attrs[i].value->item.reminder_value->lead_time[0] == NULL)) {
+ (appt->attrs[i].value->item.reminder_value->lead_time[0] == '\0')) {
free(appt->attrs[i].name);
appt->attrs[i].name = NULL;
}
start = lowerbound(tick - (day * daysec));
stop = next_ndays(start, span) - 1;
setup_range(&range_attrs, &ops, &i, start, stop, CSA_TYPE_EVENT,
- NULL, B_FALSE, version);
+ 0, B_FALSE, version);
status = csa_list_entries(target, i, range_attrs, ops, &a_total, list, NULL);
free_range(&range_attrs, &ops, i);
if (appt->end_time)
format_time(end_tick, dt, end_buf);
else
- *end_buf = NULL;
+ *end_buf = '\0';
sprintf(buf, "%s%c%7s ", start_buf,
(*end_buf ? '-' : ' '), end_buf);
}
if (!strcmp(tag, "caluser")) {
vptr->type = CSA_VALUE_CALENDAR_USER;
s_ptr = strchr(value, ':');
- *s_ptr = NULL;
+ *s_ptr = '\0';
vptr->item.calendar_user_value = calloc(sizeof(CSA_calendar_user), 1);
vptr->item.calendar_user_value->user_name = cm_strdup(s_ptr + 1);
vptr->item.calendar_user_value->user_type = atoi(value);
if (!strcmp(tag, "reminder")) {
vptr->type = CSA_VALUE_REMINDER;
s_ptr = strchr(value, ':');
- *s_ptr = NULL;
+ *s_ptr = '\0';
vptr->item.reminder_value = calloc(sizeof(CSA_reminder), 1);
l_ptr = calloc(sizeof(CSA_access_rights), 1);
s_ptr = strchr(b_ptr, ':');
- *s_ptr = NULL;
+ *s_ptr = '\0';
l_ptr->rights = atoi(b_ptr);
b_ptr = s_ptr + 1;
if (s_ptr = strchr(b_ptr, '\n'))
- *s_ptr = NULL;
+ *s_ptr = '\0';
l_ptr->user->user_name = cm_strdup(b_ptr);
strcat(a_value, "\n");
strcat(a_value, b_ptr);
- a_value[strlen(a_value) - 1] = NULL;
+ a_value[strlen(a_value) - 1] = '\0';
continue;
}
b_ptr = line;
if (c_ptr = strchr(line, ':'))
{
- *c_ptr = NULL;
+ *c_ptr = '\0';
a_name = cm_strdup(b_ptr);
}
else
if (c_ptr = strchr(b_ptr, ':'))
{
- *c_ptr = NULL;
+ *c_ptr = '\0';
a_tag = cm_strdup(b_ptr);
}
else
if (!*b_ptr)
break;
else
- b_ptr[strlen(b_ptr) - 1] = NULL;
+ b_ptr[strlen(b_ptr) - 1] = '\0';
a_value = cm_strdup(b_ptr);
}
*b_ptr++ = '\t';
p_str++;
}
- *b_ptr = NULL;
+ *b_ptr = '\0';
growcat(catbuf, buf);
char tmp_buf[MAXNAMELEN];
int advance_time;
- buffer[0] = NULL;
+ buffer[0] = '\0';
for (i = 0; i < num_attrs; i++) {
if (!attrs[i].name || (attrs[i].value == NULL))
continue;
- tmp_buf[0] = NULL;
+ tmp_buf[0] = '\0';
sprintf(tmp_buf, "%s:", attrs[i].name);
switch (attrs[i].value->type) {
case CSA_VALUE_SINT32:
a_ptr = attrs[i].value->item.access_list_value;
while (a_ptr) {
sprintf(tmp_buf, "\t%d:%s\n",
- a_ptr->rights, a_ptr->user->user_name);
+ (int) a_ptr->rights, a_ptr->user->user_name);
growcat(&buffer, tmp_buf);
a_ptr = a_ptr->next;
}
CSA_uint32 repeat_times;
static char *format_string = "\n\n\t** Calendar Appointment **\n%s:string:begin\n%s%s:string:end\n\tDate: %s\n\tStart: %s\n\tEnd: %s\n\tRepeat: %s\n\tFor: %s\n\tWhat: %s";
- s_buf[0] = NULL;
- e_buf[0] = NULL;
- w_buf[0] = NULL;
- r_buf[0] = NULL;
- f_buf[0] = NULL;
+ s_buf[0] = '\0';
+ e_buf[0] = '\0';
+ w_buf[0] = '\0';
+ r_buf[0] = '\0';
+ f_buf[0] = '\0';
_csa_iso8601_to_tick(appt->time->value->item.date_time_value, &tick);
if (appt->end_time)
fclose(f_ptr);
-
+ return(B_TRUE);
}
/*
boolean_t compute_times = B_FALSE;
char *ps2, *ptr, *ptr2, *unit;
- *repeat_type = NULL;
+ *repeat_type = '\0';
*repeat_nth = 0;
if (ps == NULL)
return;
ps2 = cm_strdup(unit);
ptr = strchr(ps2, ' ');
if (ptr != NULL)
- *ptr = NULL;
+ *ptr = '\0';
else
return;
sprintf(pstr, "%s", periodstrings[6]);
break;
case CSA_X_DT_REPEAT_EVERY_NDAY:
- sprintf(pstr, "Every %ld %s", repeat_nth, periodstrings[7]);
+ sprintf(pstr, "Every %d %s", repeat_nth, periodstrings[7]);
break;
case CSA_X_DT_REPEAT_EVERY_NWEEK:
- sprintf(pstr, "Every %ld %s", repeat_nth, periodstrings[8]);
+ sprintf(pstr, "Every %d %s", repeat_nth, periodstrings[8]);
break;
case CSA_X_DT_REPEAT_EVERY_NMONTH:
- sprintf(pstr, "Every %ld %s", repeat_nth, periodstrings[9]);
+ sprintf(pstr, "Every %d %s", repeat_nth, periodstrings[9]);
break;
case CSA_X_DT_REPEAT_OTHER:
sprintf(pstr, "%s", periodstrings[10]);