~ubuntu-branches/ubuntu/quantal/pmake/quantal

« back to all changes in this revision

Viewing changes to str.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2005-07-07 10:20:56 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050707102056-3nh411zy3wbwuwyr
Tags: 1.111-1
* New upstream snapshot.
* This version properly parses arguments and does not crash when parameters
  are missing (Closes: #287336, #316394).
* debian/control:
  + Set policy to 3.6.2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $NetBSD: str.c,v 1.21 2003/09/27 21:29:37 sjg Exp $     */
 
1
/*      $NetBSD: str.c,v 1.23 2005/02/16 15:11:52 christos Exp $        */
2
2
 
3
3
/*-
4
4
 * Copyright (c) 1988, 1989, 1990, 1993
68
68
 * SUCH DAMAGE.
69
69
 */
70
70
 
71
 
#ifdef MAKE_BOOTSTRAP
72
 
static char rcsid[] = "$NetBSD: str.c,v 1.21 2003/09/27 21:29:37 sjg Exp $";
 
71
#ifndef MAKE_NATIVE
 
72
static char rcsid[] = "$NetBSD: str.c,v 1.23 2005/02/16 15:11:52 christos Exp $";
73
73
#else
74
74
#include <sys/cdefs.h>
75
75
#ifndef lint
76
76
#if 0
77
77
static char     sccsid[] = "@(#)str.c   5.8 (Berkeley) 6/1/90";
78
78
#else
79
 
__RCSID("$NetBSD: str.c,v 1.21 2003/09/27 21:29:37 sjg Exp $");
 
79
__RCSID("$NetBSD: str.c,v 1.23 2005/02/16 15:11:52 christos Exp $");
80
80
#endif
81
81
#endif                          /* not lint */
82
82
#endif
139
139
        const char *p;
140
140
        int len;
141
141
        int argmax = 50, curlen = 0;
142
 
        char **argv = (char **)emalloc((argmax + 1) * sizeof(char *));
 
142
        char **argv = emalloc((argmax + 1) * sizeof(char *));
143
143
 
144
144
        /* skip leading space chars. */
145
145
        for (; *str == ' ' || *str == '\t'; ++str)