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

📄 revlog.c

📁 This is code tutorial for image processing include:histogram,sketon....
💻 C
字号:
/*
   revlog.c
   The Revision Control System

   Dwayne Phillips
   November 1991
*/


#include "rcs.h"



main(argc, argv)
   int argc;
   char *argv[];
{
   char   rcs_name[80], source_name[80], string[80];
   int    printing;
   FILE   *rcs_file;

   if(argc <  2   ||   argc > 2){
      printf("\n\n\tusage: revlog source-file\n");
      exit(1);
   }

   strcpy(source_name, argv[1]);
   create_rcs_file_name(source_name, rcs_name);

   if((rcs_file = fopen(rcs_name, "r")) == '\0'){
      printf("\nrevlog>> "
             "cannot open the rcs file >>%s<<",
             rcs_name);
      exit(-1);
   }

   printf("\n----------------------------------\n");

   while(fgets(string, 80, rcs_file) != '\0'){
      if( strncmp(string, FIRST_LINE, 5) == 0){
         printing = 1;
         while(printing){
            fgets(string, 80, rcs_file);
            if(strncmp(string, DELIMETER, 5) != 0){
               printf("%s", string);
            }  /* ends if != DELIMETER */
            else /* else you hit DELIMETER stop printing */
               printing = 0;
         }  /* ends while printing */
         printf("\n----------------------------------\n");
      }  /* ends if FIRST_LINE */
   }  /* ends while reading rcs file */

   fclose(rcs_file);
} 

⌨️ 快捷键说明

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