mof.c
来自「This is code tutorial for image processi」· C语言 代码 · 共 66 行
C
66 行
/******************************************************
*
* file d:\cips\mof.c
*
* Functions: This file contains
* my_open
* my_fopen
*
* Purpose: This function opens a file. Borland's
* Turbo C opens files a little different from
* the standard UNIX C. Instead of using this
* different method in a number of various files,
* the method is placed in this one file. If the
* programs are moved to another system, all changes
* will be located in this one place.
*
* External Calls:
* none
*
* Modifications:
* 18 June 1987 - created
* 27 March 1993 - my_fopen added
*
****************************************************/
#include "cips.h"
my_open(file_name)
char file_name[];
{
int file_descriptor;
file_descriptor = open(file_name, O_RDWR | O_CREAT | O_BINARY,
S_IWRITE);
return(file_descriptor);
} /* ends my_open */
/***************************************
*
* my_fopen(file_name)
*
* This function opens a file in
* read-only binary mode and returns
* the file pointer.
*
**************************************/
my_fopen(file_name)
char file_name[];
{
FILE *result;
result = fopen(file_name, "rb");
return(result);
} /* ends my_fopen */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?