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

📄 fopenx.c

📁 c语言库函数!里面包含了所以c语言中的系统函数的实现及其详细说明和代码!请大家及时下载!
💻 C
字号:
/* +++Date last modified: 05-Jul-1997 */

/*
**          MFL.LIB  function source code
**  Copyright 1986, S.E. Margison
**
**  Modified 1989-93; Copyright Robert B.Stout dba MicroFirm as part of the
**  MicroFirm Function Library (MFL).
**                                                                      
**  The user is granted a free limited license to use this source file  
**  to create royalty-free programs, subject to the terms of the        
**  license restrictions specified in the LICENSE.MFL file.             
**                                                                      
**  FUNCTION: fopenp, fopend, fopeng
**
**  Perform fopen() in path, stated environment, or both.
**  Current directory is always attempted first.
**  For fopeng() environment variable is searched before path
**  DRIVE and DIRECTORY strings may NOT be specified as part
**  of the filename.
*/

#include <stdio.h>
#include "snipfile.h"

FILE *fopenp(char *name, char *mode)
{
        char *newname;

        if (NULL != (newname = pexists(name)))
                return(fopen(newname, mode));
        else    return NULL;
}

FILE *fopend(char *name, char *mode, char *envar)
{
        char *newname;

        if (NULL != (newname = dexists(name, envar)))
                return(fopen(newname, mode));
        else    return NULL;
}

FILE *fopeng(char *name, char *mode, char *envar)
{
        char *newname;

        if (NULL != (newname = gexists(name, envar)))
                return(fopen(newname, mode));
        else    return NULL;
}

⌨️ 快捷键说明

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