src/protocols/zephyr/Zinternal.c

changeset 5136
81079a81ebc6
parent 2419
beb509dd2935
child 7475
987384816492
equal deleted inserted replaced
5135:fbcfa5df4c5e 5136:81079a81ebc6
2 * It contains source for the internal Zephyr routines. 2 * It contains source for the internal Zephyr routines.
3 * 3 *
4 * Created by: Robert French 4 * Created by: Robert French
5 * 5 *
6 * $Source$ 6 * $Source$
7 * $Author: warmenhoven $ 7 * $Author: faceprint $
8 * 8 *
9 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of 9 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
10 * Technology. 10 * Technology.
11 * For copying and distribution information, see the file 11 * For copying and distribution information, see the file
12 * "mit-copyright.h". 12 * "mit-copyright.h".
18 #include <sys/socket.h> 18 #include <sys/socket.h>
19 #include <utmp.h> 19 #include <utmp.h>
20 20
21 #ifndef lint 21 #ifndef lint
22 static const char rcsid_Zinternal_c[] = 22 static const char rcsid_Zinternal_c[] =
23 "$Id: Zinternal.c 2432 2001-10-03 19:38:28Z warmenhoven $"; 23 "$Id: Zinternal.c 5500 2003-04-15 04:18:00Z faceprint $";
24 static const char copyright[] = 24 static const char copyright[] =
25 "Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology."; 25 "Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.";
26 #endif 26 #endif
27 27
28 extern char *inet_ntoa (); 28 extern char *inet_ntoa ();
56 void *__Z_debug_print_closure; 56 void *__Z_debug_print_closure;
57 #endif 57 #endif
58 58
59 #define min(a,b) ((a)<(b)?(a):(b)) 59 #define min(a,b) ((a)<(b)?(a):(b))
60 60
61 static int Z_AddField __P((char **ptr, char *field, char *end)); 61 static int Z_AddField __P((char **ptr, const char *field, char *end));
62 static int find_or_insert_uid __P((ZUnique_Id_t *uid, ZNotice_Kind_t kind)); 62 static int find_or_insert_uid __P((ZUnique_Id_t *uid, ZNotice_Kind_t kind));
63 63
64 /* Find or insert uid in the old uids buffer. The buffer is a sorted 64 /* Find or insert uid in the old uids buffer. The buffer is a sorted
65 * circular queue. We make the assumption that most packets arrive in 65 * circular queue. We make the assumption that most packets arrive in
66 * order, so we can usually search for a uid or insert it into the buffer 66 * order, so we can usually search for a uid or insert it into the buffer
752 752
753 return (ZERR_NONE); 753 return (ZERR_NONE);
754 } 754 }
755 755
756 static int 756 static int
757 Z_AddField(ptr, field, end) 757 Z_AddField(char **ptr, const char *field, char *end)
758 char **ptr, *field, *end;
759 { 758 {
760 register int len; 759 register int len;
761 760
762 len = field ? strlen (field) + 1 : 1; 761 len = field ? strlen (field) + 1 : 1;
763 762

mercurial