~ubuntu-branches/debian/squeeze/sympa/squeeze

« back to all changes in this revision

Viewing changes to src/queue.c

  • Committer: Bazaar Package Importer
  • Author(s): Christian Perrier
  • Date: 2007-01-20 18:09:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070120180928-0e42mbwg87mlo44y
Tags: 5.2.3-1.2
* Non-maintainer upload to re-fix l10n issues
* As debconf-updatepo was not run in previous versions, the French
  translation was outdated. Hence fix it.
* Remove several duplicate spaces in the debconf templates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* queue.c - This program does the messages spooling
2
 
   RCS Identication ; $Revision: 1.4.2.1 $ ; $Date: 2005/01/27 08:54:02 $ 
 
2
   RCS Identication ; $Revision: 1.7 $ ; $Date: 2006/03/21 09:59:04 $ 
3
3
 
4
4
   Sympa - SYsteme de Multi-Postage Automatique
5
5
   Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
26
26
#include <string.h>
27
27
#include <stdlib.h>
28
28
 
29
 
static char rcsid[] = "(@)$Id: queue.c,v 1.4.2.1 2005/01/27 08:54:02 sympa-authors Exp $";
 
29
static char rcsid[] = "(@)$Id: queue.c,v 1.7 2006/03/21 09:59:04 sympa-authors Exp $";
30
30
 
31
31
static char     qfile[128];
32
32
static char     buf[16384];
41
41
# define CONFIG         "/etc/sympa.conf"
42
42
#endif
43
43
 
44
 
unsigned char *
 
44
char *
45
45
readconf(char *file)
46
46
{
47
47
   FILE                 *f;
48
 
   unsigned char        buf[16384], *p, *r, *s;
 
48
   char buf[16384], *p, *r, *s;
49
49
 
50
50
   r = NULL;
51
51
   if ((f = fopen(file, "r")) != NULL) {
53
53
        /* Search for the configword "queue" and a whitespace after it */
54
54
        if (strncmp(buf, "queue", 5) == 0 && isspace(buf[5])) {
55
55
            /* Strip the ending \n */
56
 
            if ((p = (unsigned char *)strrchr((char *)buf, '\n')) != NULL)
 
56
            if ((p = strrchr((char *)buf, '\n')) != NULL)
57
57
               *p = '\0';
58
58
            p = buf + 5;
59
59
            while (*p && isspace(*p)) p++;
84
84
int
85
85
main(int argn, char **argv)
86
86
{
87
 
   unsigned char        *queuedir;
88
 
   unsigned char        *listname;
 
87
   char *queuedir;
 
88
   char        *listname;
89
89
   unsigned int         priority;
90
90
   int                  firstfrom = 0;
91
91