1 #include <unistd.h> 2 #include <stdio.h> 3 #include <string.h> 4 5 char * 6 ctermid(char *s) 7 { 8 static char buf[L_ctermid]; 9 10 if(s == 0) 11 s = buf; 12 strncpy(s, "/dev/cons", sizeof buf); 13 return(s); 14 } 15