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

📄 gf.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
#ifndef lintstatic	char	*sccsid = "@(#)gf.c	4.1	(ULTRIX)	7/17/90";#endif lint/* EMACS_MODES: c !fill tabstop=4 *//* *	gf -- Get a .FRED file name for a particular application and subsystem. * *	The resulting pathname is placed in a static area that is overwritten *	by each call to gf (). * */#include <stdio.h>#include "filehand.h"/* Debugging options */#ifdef TRACE#define TR(W,X,Y,Z) fprintf (stdout, W, X, Y, Z)#else#define TR(W,X,Y,Z) /* W X Y Z */#endif#define SIZE 132char *gf (appl)char	*appl;{	static char	filename[SIZE];	char		inline[SIZE], *ptrs[3], *fmat[2], *tmp;	extern char	*rindex ();	extern int	sweep ();	TR("Gf: entry appl=(%s)\n", appl, EMPTY, EMPTY);	cat (filename, "/usr/lib/M2/", appl, EMPTY);	fmat[0] = "DBBD";	fmat[1] = EMPTY;	TR("Gf: fmat[0]=(%s) fmat[1]=(%s)\n", fmat[0], fmat[1], EMPTY);	if (sweep (VERIFY, filename, EMPTY, '\n', ':', SIZE, fmat, inline, ptrs,	  (int (*)()) NULL, (int (*)()) NULL) != FOUND) {		TR("Gf: not found\n", EMPTY, EMPTY, EMPTY);		return (EMPTY);		}	tmp = rindex (ptrs[1], (char) 01);	*tmp = NULL;						/* Find and clobber control A. */	cat (filename, ptrs[1], "/.fred/.FRED", EMPTY);	TR("Gf: returns (%s)\n", filename, EMPTY, EMPTY);	return (filename);}

⌨️ 快捷键说明

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