source: rtems/cpukit/libcsupport/src/ctermid.c @ f22ebf0

4.104.114.84.95
Last change on this file since f22ebf0 was 47f7dc5, checked in by Joel Sherrill <joel.sherrill@…>, on 04/03/02 at 14:22:58

2002-04-02 Ralf Corsepius <corsepiu@…>

  • libc/ctermid.c: Include <string.h>.
  • libc/ttyname.c: Ditto.
  • libc/ttyname_r.c: Ditto.
  • Property mode set to 100644
File size: 632 bytes
Line 
1/*
2 *  ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.OARcorp.com/rtems/license.html.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems.h>
19#if defined(RTEMS_NEWLIB)
20
21#include <stdio.h>
22#include <string.h>
23
24static char *ctermid_name = "/dev/console";
25
26char *ctermid(
27  char *s
28)
29{
30  if ( !s )
31    return ctermid_name;
32
33  strcpy( s, ctermid_name );
34  return s;
35}
36
37#endif
Note: See TracBrowser for help on using the repository browser.