aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-04-10 00:14:26 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-04-10 00:21:20 +0300
commit4bf0a7b054c17e39acdd0818b203c5a2eb723adc (patch)
tree8b2d45f99b73030bb01f9cdd26431d0038b1fa51
parent5bc3ba824d7bb548a5ed264a4b1366294f7abd2d (diff)
downloadgsc-4bf0a7b054c17e39acdd0818b203c5a2eb723adc.tar.gz
gsc-4bf0a7b054c17e39acdd0818b203c5a2eb723adc.tar.bz2
Remove ckaliases. See http://git.gnu.org.ua/cgit/alck.git/
Update rc.inet1
-rw-r--r--README28
-rw-r--r--ckaliases/Makefile.am23
-rw-r--r--ckaliases/ckaliases.c321
-rw-r--r--ckaliases/ckaliases.h71
-rw-r--r--ckaliases/gram.y281
-rw-r--r--ckaliases/lex.l211
-rw-r--r--doc/gsc.texi150
-rwxr-xr-x[-rw-r--r--]rc.d/rc.inet116
8 files changed, 13 insertions, 1088 deletions
diff --git a/README b/README
index 0d01089..b3e623e 100644
--- a/README
+++ b/README
@@ -9,35 +9,9 @@ various utilities I use on my machines. Basically, it was intended
9for my own use, but you may find it useful too. All scripts and 9for my own use, but you may find it useful too. All scripts and
10programs are under GPL version 3 (or later). 10programs are under GPL version 3 (or later).
11 11
12* Installation
13
14 Configure and make:
15
16 ./configure [OPTIONS]
17 make
18 make install
19
20 See the file INSTALL for the description of ./configure and its
21generic options. The options and variables specific to GSC are
22described below:
23
24--enable-sendfile
25 Attempt to use sendfile(2) when possible
26
27--enable-modules
28 Enable only modules from XMODLIST. This is not fully supported yet.
29
30--with-sendmail-version=VERSION
31 Build .cf files for the given version of Sendmail.
32
33--with-sendmail-cfdir=DIR
34 Specify full name of Sendmail cf directory (e.g.:
35 /usr/src/sendmail-8.13.1/cf/cf). Use this option only if
36 `--with-sendmail-version' does not work.
37
38* Documentation 12* Documentation
39 13
40 Full documentation is shipped in doc subdirectory 14 Complete documentation is shipped in doc subdirectory
41 15
42* Bug reporting. 16* Bug reporting.
43 17
diff --git a/ckaliases/Makefile.am b/ckaliases/Makefile.am
deleted file mode 100644
index 12f531c..0000000
--- a/ckaliases/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
1# This file is part of GSC
2# Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff
3#
4# GSC is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# GSC is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with GSC. If not, see <http://www.gnu.org/licenses/>.
16
17AM_YFLAGS=-vtd
18AM_LFLAGS=-d
19sbin_PROGRAMS=ckaliases
20noinst_HEADERS=gram.h
21ckaliases_SOURCES=gram.y lex.l ckaliases.c ckaliases.h
22LDADD=../lib/libgsc.a ../gnu/libgnu.a
23INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/gnu -I../gnu
diff --git a/ckaliases/ckaliases.c b/ckaliases/ckaliases.c
deleted file mode 100644
index d77e62d..0000000
--- a/ckaliases/ckaliases.c
+++ /dev/null
@@ -1,321 +0,0 @@
1/* ckaliases - verify syntax of sendmail-style alias files
2 Copyright (C) 2005, 2007 Sergey Poznyakoff
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3 of the License, or (at your
7 option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17#include "ckaliases.h"
18
19#ifndef CHAR_BIT
20# define CHAR_BIT 8
21#endif
22#define BITS_PER_WORD (sizeof(unsigned)*CHAR_BIT)
23#define MAXTABLE 32767
24
25#define WORDSIZE(n) (((n) + BITS_PER_WORD - 1) / BITS_PER_WORD)
26#define SETBIT(x, i) ((x)[(i)/BITS_PER_WORD] |= (1<<((i) % BITS_PER_WORD)))
27#define RESETBIT(x, i) ((x)[(i)/BITS_PER_WORD] &= ~(1<<((i) % BITS_PER_WORD)))
28#define BITISSET(x, i) (((x)[(i)/BITS_PER_WORD] & (1<<((i) % BITS_PER_WORD))) != 0)
29
30/* given n by n matrix of bits R, modify its contents
31 to be the transitive closure of what was given. */
32
33void
34TC (unsigned *R, int n)
35{
36 register int rowsize;
37 register unsigned mask;
38 register unsigned *rowj;
39 register unsigned *rp;
40 register unsigned *rend;
41 register unsigned *ccol;
42
43 unsigned *relend;
44 unsigned *cword;
45 unsigned *rowi;
46
47 rowsize = WORDSIZE (n) * sizeof (unsigned);
48 relend = (unsigned *) ((char *) R + (n * rowsize));
49
50 cword = R;
51 mask = 1;
52 rowi = R;
53 while (rowi < relend)
54 {
55 ccol = cword;
56 rowj = R;
57
58 while (rowj < relend)
59 {
60 if (*ccol & mask)
61 {
62 rp = rowi;
63 rend = (unsigned *) ((char *) rowj + rowsize);
64
65 while (rowj < rend)
66 *rowj++ |= *rp++;
67 }
68 else
69 {
70 rowj = (unsigned *) ((char *) rowj + rowsize);
71 }
72
73 ccol = (unsigned *) ((char *) ccol + rowsize);
74 }
75
76 mask <<= 1;
77 if (mask == 0)
78 {
79 mask = 1;
80 cword++;
81 }
82 rowi = (unsigned *) ((char *) rowi + rowsize);
83 }
84}
85
86
87void
88slist_add (SLIST **plist, char *str)
89{
90 struct string_list *p = xmalloc (sizeof (*p));
91 p->str = str;
92 p->next = NULL;
93
94 if (!*plist)
95 {
96 *plist = xmalloc (sizeof (**plist));
97 (*plist)->head = NULL;
98 }
99
100 if ((*plist)->head == NULL)
101 {
102 (*plist)->head = p;
103 (*plist)->count = 0;
104 }
105 else
106 {
107 (*plist)->tail->next = p;
108 (*plist)->count++;
109 }
110 (*plist)->tail = p;
111}
112
113void
114slist_append (SLIST **pdst, SLIST *src)
115{
116 struct string_list *tail;
117
118 if (!*pdst)
119 {
120 *pdst = xmalloc (sizeof (**pdst));
121 (*pdst)->head = NULL;
122 (*pdst)->count = 0;
123 }
124
125 if ((*pdst)->head = NULL)
126 (*pdst)->head = src->head;
127
128 for (tail = src->tail; tail->next; tail = tail->next)
129 ;
130
131 (*pdst)->tail = tail;
132 (*pdst)->count += src->count;
133}
134
135char *
136slist_member (SLIST *plist, char *name)
137{
138 struct string_list *p;
139
140 if (plist)
141 for (p = plist->head; p; p = p->next)
142 if (p->str && strcmp (p->str, name) == 0)
143 return p->str;
144 return NULL;
145}
146
147void
148slist_destroy (SLIST **plist)
149{
150 struct string_list *p;
151 if (!plist || !*plist)
152 return;
153 p = (*plist)->head;
154 while (p)
155 {
156 struct string_list *next = p->next;
157 free (p);
158 p = next;
159 }
160 free (*plist);
161 *plist = NULL;
162}
163
164
165typedef struct
166{
167 char *name;
168 SLIST *exp;
169} ALIAS;
170