~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/tools/regrep.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
    Regression test report generator
4
4
 
5
 
    Copyright Nicola Salmoria and the MAME Team.
6
 
    Visit http://mamedev.org for licensing and usage restrictions.
7
 
 
8
 
***************************************************************************/
 
5
****************************************************************************
 
6
 
 
7
    Copyright Aaron Giles
 
8
    All rights reserved.
 
9
 
 
10
    Redistribution and use in source and binary forms, with or without
 
11
    modification, are permitted provided that the following conditions are
 
12
    met:
 
13
 
 
14
        * Redistributions of source code must retain the above copyright
 
15
          notice, this list of conditions and the following disclaimer.
 
16
        * Redistributions in binary form must reproduce the above copyright
 
17
          notice, this list of conditions and the following disclaimer in
 
18
          the documentation and/or other materials provided with the
 
19
          distribution.
 
20
        * Neither the name 'MAME' nor the names of its contributors may be
 
21
          used to endorse or promote products derived from this software
 
22
          without specific prior written permission.
 
23
 
 
24
    THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
 
25
    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
26
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
27
    DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
 
28
    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
29
    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
30
    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
31
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 
32
    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 
33
    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
34
    POSSIBILITY OF SUCH DAMAGE.
 
35
 
 
36
****************************************************************************/
9
37
 
10
38
#include <stdio.h>
11
39
#include <stdlib.h>
177
205
        int length;
178
206
 
179
207
        /* trim leading spaces */
180
 
        while (*string != 0 && isspace(*string))
 
208
        while (*string != 0 && isspace((UINT8)*string))
181
209
                string++;
182
210
 
183
211
        /* trim trailing spaces */
184
212
        length = strlen(string);
185
 
        while (length > 0 && isspace(string[length - 1]))
 
213
        while (length > 0 && isspace((UINT8)string[length - 1]))
186
214
                string[--length] = 0;
187
215
 
188
216
        return string;
400
428
                        {
401
429
                                /* find the end of the line and normalize it with a CR */
402
430
                                for (curptr = linestart; *curptr != 0 && *curptr != '\n' && *curptr != '\r'; curptr++)
403
 
                                        if (!isspace(*curptr))
 
431
                                        if (!isspace((UINT8)*curptr))
404
432
                                                foundchars = 1;
405
433
                                *curptr++ = '\n';
406
434
                                *curptr = 0;
434
462
                        char *end;
435
463
 
436
464
                        /* find the end */
437
 
                        for (end = start; !isspace(*end); end++) ;
 
465
                        for (end = start; !isspace((UINT8)*end); end++) ;
438
466
                        *end = 0;
439
467
                        strcpy(lists[index].version, start);
440
468
                        fprintf(stderr, "Parsing results from version %s\n", lists[index].version);