View | Details | Raw Unified | Return to bug 34089
Collapse All | Expand All

(-)/usr/ports/misc/libmcal/Makefile (-3 / +3 lines)
Lines 1-19 Link Here
1
# New ports collection makefile for:	libmcal
1
# New ports collection makefile for:	libmcal
2
# Date created:		Sat Oct 13 08:45:04 GMT 2001
2
# Date created:		Sat Oct 13 08:45:04 GMT 2001
3
# Whom:			thierry@thomas.as
3
# Whom:			thierry@pompo.net
4
#
4
#
5
# $FreeBSD: ports/misc/libmcal/Makefile,v 1.2 2001/12/12 20:16:21 ijliao Exp $
5
# $FreeBSD: ports/misc/libmcal/Makefile,v 1.2 2001/12/12 20:16:21 ijliao Exp $
6
#
6
#
7
7
8
PORTNAME=	libmcal
8
PORTNAME=	libmcal
9
PORTVERSION=	0.6
9
PORTVERSION=	0.6
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	misc
11
CATEGORIES=	misc
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
14
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} mcaldrivers-0.8.tar.gz
14
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} mcaldrivers-0.8.tar.gz
15
15
16
MAINTAINER=	thierry@thomas.as
16
MAINTAINER=	thierry@pompo.net
17
17
18
LIB_DEPENDS=	ltdl.1:${PORTSDIR}/devel/libtool
18
LIB_DEPENDS=	ltdl.1:${PORTSDIR}/devel/libtool
19
19
(-)/usr/ports/misc/libmcal/files/patch-ag (-5 / +6 lines)
Lines 1-16 Link Here
1
--- icalroutines.c.orig	Tue Jan 25 04:08:10 2000
1
--- icalroutines.c.orig	Tue Jan 25 04:08:10 2000
2
+++ icalroutines.c	Thu May 11 21:43:23 2000
2
+++ icalroutines.c	Sun Jan 20 13:21:22 2002
3
@@ -1,5 +1,5 @@
3
@@ -1,5 +1,5 @@
4
 /*
4
 /*
5
- *	#$Id: icalroutines.c,v 1.1 2000/01/25 03:08:10 markie Exp $
5
- *	#$Id: icalroutines.c,v 1.1 2000/01/25 03:08:10 markie Exp $
6
+ *	#$Id: icalroutines.c,v 1.2 2000/05/11 19:43:23 inan Exp $
6
+ *	#$Id: icalroutines.c,v 1.3 2001/12/10 03:16:41 chuck Exp $
7
  *
7
  *
8
  * Libmcal - Modular Calendar Access Library 
8
  * Libmcal - Modular Calendar Access Library 
9
  * Copyright (C) 1999 Mark Musone and Andrew Skalski
9
  * Copyright (C) 1999 Mark Musone and Andrew Skalski
10
@@ -594,3 +594,110 @@
10
@@ -593,4 +593,111 @@
11
                 }
11
                 putc(pad, out);
12
                 putc(pad, out);
12
         }
13
         }
13
 }
14
+}
14
+
15
+
15
+#define MAX(a,b) (a)>(b) ? (a) :(b) 
16
+#define MAX(a,b) (a)>(b) ? (a) :(b) 
16
+void
17
+void
Lines 117-120 Link Here
117
+    } else {
118
+    } else {
118
+        *output = RECUR_NONE;
119
+        *output = RECUR_NONE;
119
+    }
120
+    }
120
+}
121
 }
(-)/usr/ports/misc/libmcal/files/patch-aj (-8 / +17 lines)
Lines 1-9 Link Here
1
--- mcal.c.orig	Sun Feb 27 06:01:54 2000
1
--- mcal.c.orig	Sun Feb 27 06:01:54 2000
2
+++ mcal.c	Tue Jan  9 04:26:48 2001
2
+++ mcal.c	Sun Jan 20 13:13:15 2002
3
@@ -1,5 +1,5 @@
3
@@ -1,5 +1,5 @@
4
 /*
4
 /*
5
- *	$Id: mcal.c,v 1.6 2000/02/27 05:01:54 inan Exp $
5
- *	$Id: mcal.c,v 1.6 2000/02/27 05:01:54 inan Exp $
6
+ *	$Id: mcal.c,v 1.9 2001/01/09 03:26:48 markie Exp $
6
+ *	$Id: mcal.c,v 1.10 2001/12/10 03:16:41 chuck Exp $
7
  * Libmcal - Modular Calendar Access Library
7
  * Libmcal - Modular Calendar Access Library
8
  * Copyright (C) 1999 Mark Musone and Andrew Skalski
8
  * Copyright (C) 1999 Mark Musone and Andrew Skalski
9
  *
9
  *
Lines 121-139 Link Here
121
 static bool		dummy_search_range(	CALSTREAM *stream,
121
 static bool		dummy_search_range(	CALSTREAM *stream,
122
 						const datetime_t *start,
122
 						const datetime_t *start,
123
 						const datetime_t *end);
123
 						const datetime_t *end);
124
@@ -967,18 +1023,28 @@
124
@@ -966,6 +1022,13 @@
125
 					unsigned long id);
125
 static bool		dummy_snooze(	CALSTREAM *stream,
126
 static bool		dummy_snooze(	CALSTREAM *stream,
126
 					unsigned long id);
127
 					unsigned long id);
127
 
128
+static bool		 dummy_store(	CALSTREAM *stream,
129
+					const CALEVENT *event);
128
+static bool		dummy_delete(	CALSTREAM *stream,
130
+static bool		dummy_delete(	CALSTREAM *stream,
129
+					char *calendar);
131
+					char *calendar);
130
+
132
+
131
+static bool		dummy_rename(	CALSTREAM *stream,
133
+static bool		dummy_rename(	CALSTREAM *stream,
132
+					char *src,char *dest);
134
+					char *src,char *dest);
133
+
135
 
134
 const CALDRIVER dummy_driver =
136
 const CALDRIVER dummy_driver =
135
 {
137
 {
136
 	dummy_valid,
138
@@ -973,12 +1036,17 @@
137
 	dummy_open,
139
 	dummy_open,
138
 	dummy_close,
140
 	dummy_close,
139
 	dummy_ping,
141
 	dummy_ping,
Lines 144-156 Link Here
144
 	dummy_append,
146
 	dummy_append,
145
 	dummy_remove,
147
 	dummy_remove,
146
 	dummy_snooze,
148
 	dummy_snooze,
149
+	dummy_store,
147
+	dummy_delete,
150
+	dummy_delete,
148
+	dummy_rename,
151
+	dummy_rename,
149
+	
152
+	
150
 };
153
 };
151
 
154
 
152
 
155
 
153
@@ -1011,6 +1077,12 @@
156
@@ -1011,6 +1079,12 @@
154
 	return false;
157
 	return false;
155
 }
158
 }
156
 
159
 
Lines 163-172 Link Here
163
 
166
 
164
 bool
167
 bool
165
 dummy_search_range(	CALSTREAM *stream,
168
 dummy_search_range(	CALSTREAM *stream,
166
@@ -1052,6 +1124,18 @@
169
@@ -1052,6 +1126,24 @@
167
 
170
 
168
 bool
171
 bool
169
 dummy_snooze(CALSTREAM *stream, unsigned long id)
172
 dummy_snooze(CALSTREAM *stream, unsigned long id)
173
+{
174
+	return false;
175
+}
176
+
177
+bool
178
+dummy_store(CALSTREAM *stream, const CALEVENT *event)
170
+{
179
+{
171
+	return false;
180
+	return false;
172
+}
181
+}
(-)/usr/ports/misc/libmcal/files/patch-al (-51 / +159 lines)
Lines 1-13 Link Here
1
--- mstore/mstore.c.orig	Mon Mar 27 06:07:12 2000
1
--- mstore/mstore.c.orig	Mon Mar 27 06:07:12 2000
2
+++ mstore/mstore.c	Tue Dec 11 08:56:58 2001
2
+++ mstore/mstore.c	Sun Jan 20 13:36:14 2002
3
@@ -1,4 +1,4 @@
3
@@ -1,31 +1,39 @@
4
-/* $Id: mstore.c,v 1.11 2000/03/27 04:07:12 zircote Exp $ */
4
-/* $Id: mstore.c,v 1.11 2000/03/27 04:07:12 zircote Exp $ */
5
+/* $Id: mstore.c,v 1.21 2001/05/07 17:37:10 chuck Exp $ */
5
+/* $Id: mstore.c,v 1.22 2001/12/25 02:41:44 chuck Exp $ */
6
 
6
 
7
 #include <stdlib.h>
7
 #include <stdlib.h>
8
 #include <string.h>
8
 #include <string.h>
9
@@ -6,26 +6,33 @@
9
 #include <errno.h>
10
 #include <pwd.h>
10
 #include <pwd.h>
11
+#include <sys/time.h>
11
 #include <unistd.h>
12
 #include <unistd.h>
12
 #include <crypt.h>
13
 #include <crypt.h>
13
+
14
+
Lines 43-49 Link Here
43
 static bool		mstore_search_range(	CALSTREAM *stream,
44
 static bool		mstore_search_range(	CALSTREAM *stream,
44
 						const datetime_t *start,
45
 						const datetime_t *start,
45
 						const datetime_t *end);
46
 						const datetime_t *end);
46
@@ -44,12 +51,18 @@
47
@@ -44,12 +52,18 @@
47
 					unsigned long id);
48
 					unsigned long id);
48
 static bool             mstore_store(   CALSTREAM *stream, 
49
 static bool             mstore_store(   CALSTREAM *stream, 
49
 					const CALEVENT *modified_event);
50
 					const CALEVENT *modified_event);
Lines 62-68 Link Here
62
 	mstore_search_range,
63
 	mstore_search_range,
63
 	mstore_search_alarm,
64
 	mstore_search_alarm,
64
 	mstore_fetch,
65
 	mstore_fetch,
65
@@ -57,6 +70,8 @@
66
@@ -57,6 +71,8 @@
66
 	mstore_remove,
67
 	mstore_remove,
67
 	mstore_snooze,
68
 	mstore_snooze,
68
 	mstore_store,
69
 	mstore_store,
Lines 71-77 Link Here
71
 };
72
 };
72
 
73
 
73
 
74
 
74
@@ -88,13 +103,98 @@
75
@@ -88,13 +104,98 @@
75
 }
76
 }
76
 
77
 
77
 
78
 
Lines 171-177 Link Here
171
   if(!mpasswd)
172
   if(!mpasswd)
172
     {
173
     {
173
       printf("Error! couldn't open mpasswd file!\n");
174
       printf("Error! couldn't open mpasswd file!\n");
174
@@ -123,36 +223,31 @@
175
@@ -123,36 +224,31 @@
175
     }
176
     }
176
 	fclose(mpasswd);
177
 	fclose(mpasswd);
177
       return false;
178
       return false;
Lines 233-239 Link Here
233
 }
234
 }
234
 
235
 
235
 
236
 
236
@@ -161,8 +256,6 @@
237
@@ -161,8 +257,6 @@
237
 {
238
 {
238
 	if (!addr->proto || strcasecmp(addr->proto, "mstore"))
239
 	if (!addr->proto || strcasecmp(addr->proto, "mstore"))
239
 		return false;
240
 		return false;
Lines 242-248 Link Here
242
 	return true;
243
 	return true;
243
 }
244
 }
244
 
245
 
245
@@ -197,10 +290,18 @@
246
@@ -197,10 +291,18 @@
246
 	}
247
 	}
247
 
248
 
248
 		cc_login(&username, &password);
249
 		cc_login(&username, &password);
Lines 263-269 Link Here
263
 	}
264
 	}
264
 
265
 
265
 	if (!reopen) {
266
 	if (!reopen) {
266
@@ -212,13 +313,23 @@
267
@@ -212,13 +314,23 @@
267
 
268
 
268
 	if (options & CAL_LOGIN) {
269
 	if (options & CAL_LOGIN) {
269
 		/* Copy login_userbuf, folder. */
270
 		/* Copy login_userbuf, folder. */
Lines 289-295 Link Here
289
 
290
 
290
 	/* Set up folder_user */
291
 	/* Set up folder_user */
291
 	if(addr->host)
292
 	if(addr->host)
292
@@ -229,8 +340,13 @@
293
@@ -229,8 +341,13 @@
293
 		DATA->login_user=DATA->login_userbuf;
294
 		DATA->login_user=DATA->login_userbuf;
294
 		if (addr->user) {
295
 		if (addr->user) {
295
 		  /* Copy and split folder_userbuf */
296
 		  /* Copy and split folder_userbuf */
Lines 304-310 Link Here
304
 		  /* Check for identical folder/login users. */
305
 		  /* Check for identical folder/login users. */
305
 		  DATA->folder_user=DATA->folder_userbuf;
306
 		  DATA->folder_user=DATA->folder_userbuf;
306
 		  if (	!strcmp(DATA->login_user, DATA->folder_user))
307
 		  if (	!strcmp(DATA->login_user, DATA->folder_user))
307
@@ -246,7 +362,6 @@
308
@@ -246,7 +363,6 @@
308
 		DATA->folder_user = DATA->login_user;
309
 		DATA->folder_user = DATA->login_user;
309
 	}
310
 	}
310
 
311
 
Lines 312-318 Link Here
312
 	return stream;
313
 	return stream;
313
 fail:
314
 fail:
314
 	mstore_freestream(stream);
315
 	mstore_freestream(stream);
315
@@ -270,6 +385,36 @@
316
@@ -270,6 +386,36 @@
316
 }
317
 }
317
 
318
 
318
 
319
 
Lines 349-365 Link Here
349
 CALEVENT *read_event(FILE *calfile)
350
 CALEVENT *read_event(FILE *calfile)
350
 {
351
 {
351
 	char		line[100];
352
 	char		line[100];
352
@@ -277,7 +422,8 @@
353
@@ -334,79 +480,75 @@
353
 	int		size;
354
 	CALEVENT	*event;
355
 
356
-	fgets(line, sizeof(line), calfile);
357
+	if (fgets(line, sizeof(line), calfile) == NULL)
358
+		return NULL;
359
 	if (sscanf(line, "%d", &size) != 1)
360
 		return NULL;
361
 	buf = malloc(size + 2);
362
@@ -334,17 +480,18 @@
363
 	datetime_t	_end = DT_INIT;
354
 	datetime_t	_end = DT_INIT;
364
 	FILE *calfile;
355
 	FILE *calfile;
365
 	char userpath[1000];
356
 	char userpath[1000];
Lines 378-398 Link Here
378
 	rewind(calfile);
369
 	rewind(calfile);
379
 
370
 
380
 	if (start) {
371
 	if (start) {
381
 		if (!dt_hasdate(start))
372
-		if (!dt_hasdate(start))
382
+//LM:should this be _start = NULL? and again below for end?
373
-			start = NULL;
383
 			start = NULL;
374
-		else {
384
 		else {
375
-			dt_setdate(&_start,
385
 			dt_setdate(&_start,
376
-				start->year, start->mon, start->mday);
386
@@ -358,7 +505,7 @@
377
-		}
387
 			dt_setdate(&_end, end->year, end->mon, end->mday);
378
+	    if (!dt_hasdate(start)) {
379
+		// LM:should this be _start = NULL? and again below for end?
380
+		start = NULL;
381
+	    } else {
382
+		dt_setdate(&_start,
383
+			   start->year, start->mon, start->mday);
384
+	    }
388
 	}
385
 	}
389
 
386
 	if (end) {
387
-		if (!dt_hasdate(end))
388
-			end = NULL;
389
-		else
390
-			dt_setdate(&_end, end->year, end->mon, end->mday);
391
-	}
392
-
390
-	while((event=read_event(calfile))) {
393
-	while((event=read_event(calfile))) {
391
+	while((event = read_event(calfile))) {
394
-		datetime_t	clamp = DT_INIT;
392
 		datetime_t	clamp = DT_INIT;
395
-
396
-		if (!start)
397
-			dt_setdate(&clamp, 1, JANUARY, 1);
398
-		else {
399
-			dt_setdate(&clamp,
400
-				_start.year, _start.mon, _start.mday);
401
-		}
402
+	    if (!dt_hasdate(end))
403
+	      end = NULL;
404
+	    else
405
+	      dt_setdate(&_end, end->year, end->mon, end->mday);
406
+	}
407
+    
408
+	while ((event = read_event(calfile))) {
409
+	    datetime_t	clamp = DT_INIT;
410
+	    
411
+	    if (!start) {
412
+		dt_setdate(&clamp, 1, JANUARY, 1);
413
+	    } else {
414
+		dt_setdate(&clamp,
415
+			   _start.year, _start.mon, _start.mday);
416
+	    }
417
 
418
-		calevent_next_recurrence(event, &clamp, stream->startofweek);
419
-		if (	dt_hasdate(&clamp) &&
420
-			!(end && dt_compare(&clamp, &_end) > 0))
421
-		{
422
-			cc_searched(event->id);
423
-		}
424
+	    calevent_next_recurrence(event, &clamp, stream->startofweek);
425
+	    if (dt_hasdate(&clamp) &&
426
+		!(end && dt_compare(&clamp, &_end) > 0)) {
427
+		cc_searched(event->id);
428
+	    }
429
 
430
-		calevent_free(event);
431
+	    calevent_free(event);
432
 	}
433
-	fclose(calfile);
434
-	return true;
435
+    fclose(calfile);
436
+    return true;
437
 }
438
 
393
 
439
 
394
 		if (!start)
395
@@ -385,28 +532,24 @@
396
 bool
440
 bool
397
 mstore_search_alarm(CALSTREAM *stream, const datetime_t *when)
441
 mstore_search_alarm(CALSTREAM *stream, const datetime_t *when)
398
 {
442
 {
Lines 409-416 Link Here
409
-	if(!calfile)
453
-	if(!calfile)
410
-	  {
454
-	  {
411
+	snprintf(userpath, 900, "%s/%s", DATA->base_path, DATA->folder_user);
455
+	snprintf(userpath, 900, "%s/%s", DATA->base_path, DATA->folder_user);
412
+	calfile=fopen (userpath, "a+");
456
+	calfile = fopen (userpath, "a+");
413
+	if(!calfile) {
457
+	if (!calfile) {
414
 	    printf("Error! couldn't open calendar file!\n");
458
 	    printf("Error! couldn't open calendar file!\n");
415
 	    exit(1);
459
 	    exit(1);
416
-	  }
460
-	  }
Lines 431-437 Link Here
431
 		}
475
 		}
432
 		calevent_free(event);
476
 		calevent_free(event);
433
 	}
477
 	}
434
@@ -422,13 +565,12 @@
478
@@ -422,13 +564,12 @@
435
 	FILE		*calfile;
479
 	FILE		*calfile;
436
 	char		userpath[1000];
480
 	char		userpath[1000];
437
 
481
 
Lines 449-467 Link Here
449
 	rewind(calfile);
493
 	rewind(calfile);
450
 	while((event=read_event(calfile))) {
494
 	while((event=read_event(calfile))) {
451
 		if(event->id==id) {
495
 		if(event->id==id) {
452
@@ -459,8 +601,11 @@
496
@@ -445,43 +586,45 @@
453
 	if (strcasecmp(addr->folder, "INBOX"))
497
 
454
 		return false;
498
 
499
 bool
500
-mstore_append(	CALSTREAM *stream, const CALADDR *addr,
501
-			unsigned long *id, const CALEVENT *event)
502
+mstore_append(CALSTREAM *stream, const CALADDR *addr,
503
+              unsigned long *id, const CALEVENT *event)
504
 {
505
-	CALEVENT myevent;
506
-	FILE *calfile;
507
-	char userpath[1000];
508
+    CALEVENT myevent;
509
+    FILE *calfile;
510
+    char userpath[1000];
511
+    
512
+    if (addr->host) {
513
+	return false;
514
+    }
515
+    if (addr->user) {
516
+	return false;
517
+    }
518
+    if (strcasecmp(addr->folder, "INBOX")) {
519
+	return false;
520
+    }
521
 
522
-	if (addr->host)
523
-		return false;
524
-	if (addr->user)
525
-		return false;
526
-	if (strcasecmp(addr->folder, "INBOX"))
527
-		return false;
528
+    if (!dt_hasdate(&event->start)) {
529
+	return false;
530
+    }
531
 
532
-	if (DATA->folder_userbuf)
533
-		return false;
534
-	if (!dt_hasdate(&event->start))
535
-		return false;
536
+    snprintf(userpath, 900, "%s/%s", DATA->base_path, DATA->folder_user);
537
+    calfile = fopen(userpath, "a");
538
+    if (!calfile) {
539
+        printf("Error! couldn't open calendar file %s\n",userpath);
540
+	perror("mstore_append");
541
+        return false;
542
+    }
543
 
544
-	snprintf(userpath,900,"%s/%s",DATA->base_path,DATA->folder_user);
545
-	calfile=fopen (userpath,"a");
546
-        if(!calfile)
547
-          {
548
-            printf("Error! couldn't open calendar file %s\n",userpath);
549
-	    perror("mstore_append");
550
-            return false;
551
-          }
552
-
553
-	myevent = *event;
554
-	myevent.id = time(NULL);
555
-	write_event(calfile, &myevent);
556
+    myevent = *event;
557
+    myevent.id = time(NULL);
558
+    
559
+    write_event(calfile, &myevent);
560
 
561
-	fclose(calfile);
562
+    fclose(calfile);
563
 
564
-	*id = myevent.id;
565
+    *id = myevent.id;
566
 
567
-	return true;
568
+    return true;
569
 }
455
 
570
 
456
+	/* comment this out so that we can share calendars
457
 	if (DATA->folder_userbuf)
458
 		return false;
459
+	*/
460
+	
461
 	if (!dt_hasdate(&event->start))
462
 		return false;
463
 
571
 
464
@@ -609,3 +754,15 @@
572
@@ -609,3 +752,15 @@
465
         return true;
573
         return true;
466
 }
574
 }

Return to bug 34089