⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctermid.c

📁 操作系统源代码
💻 C
字号:
/*  ctermid(3) * *  Author: Terrence Holm          Aug. 1988 * * *  Ctermid(3) returns a pointer to a string naming the controlling *  terminal. If <name_space> is NULL then local PRIVATE storage *  is used, otherwise <name_space> must point to storage of at *  least L_ctermid characters. * *  Returns a pointer to "/dev/tty". */#include <lib.h>#include <string.h>#include <stdio.h>_PROTOTYPE( char *ctermid, (char *name_space));#ifndef L_ctermid#define L_ctermid  9#endifchar *ctermid(name_space)char *name_space;{  PRIVATE char termid[L_ctermid];  if (name_space == (char *)NULL) name_space = termid;  strcpy(name_space, "/dev/tty");  return(name_space);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -