File: install-datebook.patch

package info (click to toggle)
webcalendar 0.9.45-4sarge7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,888 kB
  • ctags: 4,775
  • sloc: php: 16,990; sql: 1,272; perl: 777; sh: 120; makefile: 45
file content (30 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- install-datebook.c.orig	Wed Jan 13 23:29:31 1999
+++ install-datebook.c	Thu Jun 22 12:47:10 2000
@@ -129,7 +129,7 @@
 	} else {
 	  appointment.event = 0;
 	}
-	if (fields[0][0] == '\0') {
+	if (fields[0][0] != '\0') {
 	  time_t t;
 	  appointment.event = 0;
 	  t = parsedate(fields[0]);
@@ -139,7 +139,7 @@
 	  }
 	  appointment.begin = *localtime(&t);
 	}
-	if (fields[1][0] == '\0') {
+	if (fields[1][0] != '\0') {
 	  time_t t;
 	  t = parsedate(fields[1]);
 	  if (t == -1) {
@@ -177,6 +177,9 @@
 	Appointment_size = pack_Appointment(&appointment, Appointment_buf,
 					    sizeof(Appointment_buf));
 	printf("desc: %s\n", appointment.description); 
+        printf("date: %d/%d/%d %d:%02d\n", appointment.begin.tm_mon + 1,
+          appointment.begin.tm_mday, appointment.begin.tm_year + 1900,
+          appointment.begin.tm_hour, appointment.begin.tm_min );
 	dlp_WriteRecord(sd, db, 0, 0, 0, Appointment_buf, Appointment_size, 0);
 	fields[fieldno++] = cPtr;
       } else {