易截截图软件、单文件、免安装、纯绿色、仅160KB

通配符的 C 语言源代码

/* find files from wildcards, for MicroSoft C v4.0 */
/* ------------------------------------------------------------ */
/*   copyright 1986:      */
/*   Nourse Gregg & Browne, Inc.  */
/*   1 Horizon Road. #612   */
/*   Fort Lee, NJ 07024   */
/*        */
/* ------------------------------------------------------------ */
/* ----------------------------------------------------------------------*
 This pair of routines will do a wildcard search
 you must call dfirst() once to supply the search pattern
 and get back the first file that matches that pattern.
 then, call dnext() to get the next file in the list.
 both dfirst() and dnext() return zero if a file has been found,
  non-zero otherwise.
 The calling parameters are as follows:
 dfirst(pattern,attr,file_name,file_date,file_time,file_size);
 dnext(file_name,file_date,file_time,file_size);
     Where:
 char *pattern;  (wild card pattern. eg. "*.c" )
 int   attr;  (the file attribute qualifier )
 char *file_name; (output: the name of found file (13 bytes min.) )
 int  *file_date; (output: the file's date (directory format) )
 int  *file_time; (output: the file's time )
 long *file_size; (output: the file's size in bytes )
*----------------------------------------------------------------- */
#include <dos.h>
#include <stdlib.h>
#define SET_DTA 0x1A
#define GET_DTA 0x2F
#define FIND_FIRST 0x4E
#define FIND_NEXT 0x4F
 struct dta_struct {
 char dummy[21];
 char attr;
 int time;
 int date;
 int low_size;
 int hi_size;
 char name[13];
 char dummy2[14];
 };
static struct dta_struct dta;
dfirst (fmask,fattr,fname,fdate,fti


相关文档:

C/C++笔试、面试题目汇总

1.求下面函数的返回值(微软)
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
}
return countx;
}
假定x = 9999。 答案:8
思路:将x转化为2进制,看含有的1的个数。
2. 什么是“引用”?申明和使用“引用”要注意哪些问题?
答:引用就是某个目标变量的&ldquo ......

回忆C古老的math.h库 FreeEIM

回忆C古老的math.h库
概述:
  math.h中为我们提供了三角函数数值运算、指数对数运算、绝对值、平方值、以及一些基本的数值处理。
函数:sin
功能:计算弧度的正弦值。
使用说明:sin(x),x为传入的弧度值。
函数:cos
功能:计算弧度的余弦值。
使用说明:cos(x),x为传入的弧度值。
函数:tan
功能:计算弧度 ......

C/C++ 路径为目录判断

#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
/****************************************************
* 函数功能: 判断参数路径是否为(正确的)目录
* 函数返回: 0为表示路径为文件,1为非目录.其他为错误
*    参数: path文件需要判断的目录的路径.
*  ......

linux下计算指定目录下影件的大小,基于c语言

 1//由于使用gcc编译,所以编译时要链接上c++的库,命令是gcc -lstdc++ main.cpp -o main
//本文小程序实现的是对/home/1.avi大小的计算。很简单,贴出来只是为了方便不知道的朋友
  2 #include <stdio.h>
  3 #include <stdlib.h>
  4 #include <sys/stat.h>
  5 #includ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号