source: trunk/src/emx/src/lib/io/ttyname.c@ 146

Last change on this file since 146 was 146, checked in by zap, 23 years ago

Changed to _STD most standard functions.
Added the rules to build c_alias.a from all declared _STD functions
removed a lot of obsolete stuff.
changed crt0.s and dll0.s since we don't EMX anymore.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 418 bytes
Line 
1/* ttyname.c (emx+gcc) -- Copyright (c) 1995-1996 by Eberhard Mattes */
2
3#include "libc-alias.h"
4#include <unistd.h>
5#include <emx/syscalls.h>
6#include <emx/thread.h>
7
8char *_STD(ttyname) (int handle)
9{
10#if defined (__MT__)
11 struct _thread *tp = _thread ();
12#define buf (tp->_th_ttyname)
13#else
14 static char buf[32];
15#endif
16
17 if (__ttyname (handle, buf, sizeof (buf)) == 0)
18 return buf;
19 else
20 return NULL;
21}
Note: See TracBrowser for help on using the repository browser.