fat16文件系统 c文件
/* =========================================================================== */
/* Project: mp3 player */
/* File: fat16.c */
/* Organization: cug-1200525 */
/* Author: yuyongbao */
/* Date: 6/19/2007 */
/* Describe: fat16 */
/* =========================================================================== */
#include "..\lib_config.h"
#include "FAT16.h"
#include "string.h"
//********************************************************************************************
//deine value which may be used in each function
uint8 BUFFER[512]; //a sectors size
uint16 BPB_BytsPerSec;
uint8 BPB_SecPerClus;
uint16 BPB_RsvdSecCnt;
uint8 BPB_NumFATs;
uint16 BPB_RootEntCnt;
uint16 BPB_TotSec16;
uint16 BPB_FATSz16;
uint32 BPB_HiddSec;
uint32 BPB_TotSec32;
/////whe
相关文档:
曾经碰到过让你迷惑不解、类似于int * (* (*fp1) (int) ) [10];这样的变量声明吗?
本文将由易到难,一步一步教会你如何理解这种复杂的C/C++声明。
我们将从每天都能碰到的较简单的声明入手,然后逐步加入const修饰符和typedef,还有函数指针,最后介绍一个能够让你准确地理解任何C/C++声明的“右左法则&rdquo ......
The meaning of each is:
MemberMeaningRange
tm_sec
seconds after the minute
0-61*
tm_min
minutes after the hour
0-59
tm_hour
hours since midnight
0-23
tm_mday
day of the month
1-31
tm_mon
months since January
0-11
tm_year
years since 1900
tm_wday
days since Sunday
0-6
tm_yday
d ......
面试时被问到过,不甚明了,网上百度一下,整合了两个仁兄的文章,如下。:-)
时常在cpp的代码之中看到这样的代码:
#ifdef __cplusplus //c++编译环境中才会定义__cplusplus (plus就是"+"的意思)
extern "C" { //告诉编译器下面的函数是c语言函数(因为c++和c语言对函数的编译转换不一样,主要是c++中存在重载)
#en ......
1、为了调用宏时能得到正确结果,在宏体中建议对宏的每个参数用括号括起来,并且当宏体是一个表达式时整个宏体也用括号括起来。
/* c1.c:将两个数相乘 */
#define product(x,y) ((x)*(y))
#include <stdio.h>
int main(){
int a=1,b=2,c=3,d=4,x=0;
x=product(a+3,b)+product(c,d); / ......
/* =========================================================================== */
/* Project: s3c44b0_lib & ......