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

📄 mof.c

📁 This is code tutorial for image processing include:histogram,sketon....
💻 C
字号:


           /******************************************************
           *
           *       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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -