Ticket #1541: sup_fs_is_separator.c

File sup_fs_is_separator.c, 696 bytes (added by Bharath Suri, on 06/05/10 at 13:14:02)

New file having rtems_filesystem_is_separator function @ rtems/cpukit/libcsupport/src/

Line 
1/**
2 * @file src/sup_fs_is_separator.c
3 */
4
5/*
6 *
7 *  COPYRIGHT (c) 1989-1999.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  $Id: sup_fs_is_separator.c,v 0.01 2010/05/31 15:45:05 ralf Exp $
15 */
16
17
18/*
19 *  rtems_filesystem_is_separator
20 *
21 *  Function to determine if a character is a path name separator.
22 *  This was originally a macro in libio_.h
23 *
24 *  NOTE:  This function handles MS-DOS and UNIX style names.
25 */
26
27int rtems_filesystem_is_separator(char ch)
28{
29  return ((ch == '/') || (ch == '\\') || (ch == '\0'));
30}