Changeset e15ae5a3 in rtems for testsuites


Ignore:
Timestamp:
Dec 5, 2018, 3:28:39 PM (12 months ago)
Author:
Himanshu40 <himanshuwindows8.1@…>
Branches:
master
Children:
e517fe68
Parents:
7fe5922a
git-author:
Himanshu40 <himanshuwindows8.1@…> (12/05/18 15:28:39)
git-committer:
Joel Sherrill <joel@…> (12/05/18 17:42:31)
Message:

psxhdrs: Align the code properly to left hand margin

Location:
testsuites/psxtests/psxhdrs/dirent
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxhdrs/dirent/alphasort.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
     28 int test( void );
    2929
    30   int test( void )
    31   {
    32     const struct dirent **d1 = NULL;
    33     const struct dirent **d2 = NULL;
    34     int result;
     30 int test( void )
     31 {
     32   const struct dirent **d1 = NULL;
     33   const struct dirent **d2 = NULL;
     34   int result;
    3535
    36     result = alphasort( d1, d2 );
     36   result = alphasort( d1, d2 );
    3737
    38     return result;
    39   }
     38   return result;
     39 }
  • testsuites/psxtests/psxhdrs/dirent/closedir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
     28 int test( void );
    2929
    30   int test( void )
    31   {
    32     DIR *dir;
    33     int result;
     30 int test( void )
     31 {
     32   DIR *dir;
     33   int result;
    3434
    35     dir = opendir( "/" );
    36     result = closedir( dir );
     35   dir = opendir( "/" );
     36   result = closedir( dir );
    3737
    38     return result;
    39   }
     38   return result;
     39 }
  • testsuites/psxtests/psxhdrs/dirent/dirfd.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
     28 int test( void );
    2929
    30   int test( void )
    31   {
    32     DIR *dirp;
    33     int result;
     30 int test( void )
     31 {
     32   DIR *dirp;
     33   int result;
    3434
    35     dirp = opendir( "/" );
    36     result = dirfd( dirp );
     35   dirp = opendir( "/" );
     36   result = dirfd( dirp );
    3737
    38     return result;
    39   }
     38   return result;
     39 }
  • testsuites/psxtests/psxhdrs/dirent/fdopendir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
    27   #include <fcntl.h>
    28   #include <sys/stat.h>
    29   #include <sys/types.h>
     26 #include <dirent.h>
     27 #include <fcntl.h>
     28 #include <sys/stat.h>
     29 #include <sys/types.h>
    3030
    31   int test( void );
     31 int test( void );
    3232
    33   int pass = 1;
     33 int test( void )
     34 {
     35   int fd;
     36   DIR *result;
    3437
    35   int test( void )
    36   {
    37     int fd;
    38     DIR *result;
     38   fd = open( "./", O_RDONLY );
     39   result = fdopendir( fd );
    3940
    40     if( pass == 1 )
    41     {
    42       fd = open( "./", O_RDONLY );
    43       result = fdopendir( fd );
    44       (void) result;
    45       pass = 0;
    46     }
    47 
    48     return pass;
     41   return ( result != NULL );
    4942  }
  • testsuites/psxtests/psxhdrs/dirent/opendir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
     28 int test( void );
    2929
    30   int result = 1;
     30 int test( void )
     31 {
     32   DIR *dir;
    3133
    32   int test( void )
    33   {
    34     DIR *dir;
     34   dir = opendir( "/" );
    3535
    36     if( result == 1 )
    37     {
    38       dir = opendir( "/" );
    39       (void) dir;
    40       result = 0;
    41     }
    42 
    43     return result;
    44   }
     36   return ( dir != NULL );
     37 }
  • testsuites/psxtests/psxhdrs/dirent/readdir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
    29   int pass = 1;
     28 int test( void );
    3029
    31   int test( void )
    32   {
    33     DIR *dirp;
    34     struct dirent *result;
     30 int test( void )
     31 {
     32   DIR *dirp;
     33   struct dirent *result;
    3534
    36     if( pass == 1 )
    37     {
    38       dirp = opendir( "/" );
    39       result = readdir( dirp );
    40       (void) result;
    41       pass = 0;
    42     }
     35   dirp = opendir( "/" );
     36   result = readdir( dirp );
    4337
    44     return pass;
    45   }
     38   return ( result != NULL );
     39 }
  • testsuites/psxtests/psxhdrs/dirent/readdir_r.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
     28 int test( void );
    2929
    30   int test( void )
    31   {
    32     DIR *dirp;
    33     struct dirent *entry = NULL;
    34     struct dirent *result = NULL;
    35     int pass;
     30 int test( void )
     31 {
     32   DIR *dirp;
     33   struct dirent *entry = NULL;
     34   struct dirent *result = NULL;
     35   int pass;
    3636
    37     dirp = opendir( "/" );
    38     entry = readdir(dirp);
    39     pass = readdir_r( dirp,  entry, &result);
     37   dirp = opendir( "/" );
     38   entry = readdir(dirp);
     39   pass = readdir_r( dirp,  entry, &result);
    4040
    41     return pass;
    42   }
     41   return pass;
     42 }
  • testsuites/psxtests/psxhdrs/dirent/rewinddir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
    29   int result = 1;
     28 int test( void );
    3029
    31   int test( void )
    32   {
    33     DIR *dirp;
     30 int test( void )
     31 {
     32   DIR *dirp;
    3433
    35     if( result == 1 )
    36     {
    37     dirp = opendir( "/" );
    38     rewinddir( dirp );
    39     result = 0;
    40     }
     34   dirp = opendir( "/" );
     35   rewinddir( dirp );
    4136
    42     return result;
    43   }
     37   return ( dirp != NULL );
     38 }
  • testsuites/psxtests/psxhdrs/dirent/scandir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
     28 int test( void );
    2929
    30   int test( void )
    31   {
    32     struct dirent **namelist;
    33     int result;
     30 int test( void )
     31 {
     32   struct dirent **namelist;
     33   int result;
    3434
    35     result = scandir( ".", &namelist, NULL, alphasort );
     35   result = scandir( ".", &namelist, NULL, alphasort );
    3636
    37     return result;
    38   }
     37   return result;
     38 }
  • testsuites/psxtests/psxhdrs/dirent/seekdir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
    29   int result = 1;
     28 int test( void );
    3029
    31   int test( void )
    32   {
    33     DIR *dirp;
    34     long loc;
     30 int test( void )
     31 {
     32   DIR *dirp;
     33   long loc;
    3534
    36     if( result == 1 )
    37     {
    38       dirp = opendir( "/" );
    39       loc = telldir( dirp );
    40       seekdir( dirp, loc );
    41       result = 0;
    42     }
     35   dirp = opendir( "/" );
     36   loc = telldir( dirp );
     37   seekdir( dirp, loc );
    4338
    44     return result;
    45   }
     39   return ( (int)loc );
     40 }
  • testsuites/psxtests/psxhdrs/dirent/telldir.c

    r7fe5922a re15ae5a3  
    44 */
    55
    6  /*
    7   *  COPYRIGHT (c) 2018.
    8   *  Himanshu Sekhar Nayak
    9   *
    10   *  Permission to use, copy, modify, and/or distribute this software
    11   *  for any purpose with or without fee is hereby granted.
    12   *
    13   *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    14   *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
    15   *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
    16   *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
    17   *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
    18   *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
    19   *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    20   */
     6/*
     7 *  COPYRIGHT (c) 2018.
     8 *  Himanshu Sekhar Nayak
     9 *
     10 *  Permission to use, copy, modify, and/or distribute this software
     11 *  for any purpose with or without fee is hereby granted.
     12 *
     13 *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
     14 *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
     15 *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
     16 *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
     17 *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     18 *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     19 *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     20 */
    2121
    22   #ifdef HAVE_CONFIG_H
    23   #include "config.h"
    24   #endif
     22 #ifdef HAVE_CONFIG_H
     23 #include "config.h"
     24 #endif
    2525
    26   #include <dirent.h>
     26 #include <dirent.h>
    2727
    28   int test( void );
    29   int result = 1;
     28 int test( void );
    3029
    31   int test( void )
    32   {
    33     DIR *dirp;
    34     long loc;
     30 int test( void )
     31 {
     32   DIR *dirp;
     33   long loc;
    3534
    36     if( result == 1 )
    37     {
    38       dirp = opendir( "/" );
    39       loc = telldir( dirp );
    40       (void) loc;
    41       result = 0;
    42     }
     35   dirp = opendir( "/" );
     36   loc = telldir( dirp );
    4337
    44     return result;
    45   }
     38   return ( (int)loc );
     39 }
Note: See TracChangeset for help on using the changeset viewer.