source: branches/libc-0.6/testcase/567main.cpp@ 3720

Last change on this file since 3720 was 514, checked in by bird, 22 years ago

Simple testcase.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 554 bytes
Line 
1/* $Id: 567main.cpp 514 2003-08-02 23:11:16Z bird $
2 *
3 * Defect 567: ctype and negative offsets.
4 *
5 * InnoTek Systemberatung GmbH confidential
6 *
7 * Copyright (c) 2003 InnoTek Systemberatung GmbH
8 * Author: knut st. osmundsen <bird-srcspam@anduin.net>
9 *
10 * All Rights Reserved
11 *
12 */
13
14
15#include <ctype.h>
16
17int main()
18{
19 int i;
20 int rc = 0;
21 char ch[] = {'a', 'b', 'c', 'z',
22 12, -12, -127, 127,
23 0};
24
25 for (i = 0; ch[i]; i++)
26 {
27 if (isalpha(ch[i]))
28 rc++;
29 else
30 rc--;
31 }
32 return rc;
33}
Note: See TracBrowser for help on using the repository browser.