1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5/*=============================================================
6**
7** Source: isprint.c
8**
9** Purpose: Positive test the isprint API.
10** Call isprint to test if a character is printable
11**
12**
13**============================================================*/
14#include <palsuite.h>
15
16int __cdecl main(int argc, char *argv[])
17{
18 int err;
19 int index;
20
21 /*Initialize the PAL environment*/
22 err = PAL_Initialize(argc, argv);
23 if(0 != err)
24 {
25 return FAIL;
26 }
27
28 /*check if the character is printable*/
29 for(index = 0x20; index<=0x7E;index++)
30 {
31 err = isprint(index);
32 if(0 == err)
33 {
34 Fail("\nFailed to call isprint API to check "
35 "printable character from 0x20 to 0x7E!\n");
36 }
37 }
38
39
40 PAL_Terminate();
41 return PASS;
42}
43