linemod.c

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· C语言 代码 · 共 41 行

C
41
字号
/* *		Copyright (C) 1986 by *		DIGITAL EQUIPMENT CORPORATION, Maynard, MA. * *  This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. * * Creation date: February 1, 1986 * Modifications: Added lvp16 dependent code. */#ifndef lintstatic char SccsId[]="@(#)linemod.c	4.1	ULTRIX	7/2/90";#endif not lint#include "lvp16.h"linemod(s)char *s;{	int c;	printf("LT ");	switch(s[0]){	case 'l':			printf("3;");		break;	case 'd':			/*if 4th character is "d" then "dotdashed" else "dotted"*/		if(s[3] != 'd')printf("1;");		else printf("4;");		break;	case 's':		/*if 6th character is  there, then it is shortdashed notsolid */		if(s[5] != '\0')printf("2;");		else printf(";");	}}

⌨️ 快捷键说明

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