学会对文件的记录锁定,及解锁。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open("name", O_RDWR|O_CREAT, 0755) if (fd == -1) return -1 printf("Input your name:") scanf("%s", myrec.name) printf("Inpute your ID :") scanf("%d", &myrec.ID) printf("Input your age :") scanf("%d", &myrec.age) lseek(fd, 0,SEEK_END) lockf(fd, 1, 0) write(fd, (void *)&myrec, sizeof(myrec)) lockf(fd, 0 ,0) return 0 } 执行命令cc lock.c –o lock.out Chmod +x lock.out ./lock.out
标签: 记录
上传时间: 2016-01-04
上传用户:亚亚娟娟123
Linux 2.4.18 s3c2440 led driver 使用dev-C++撰寫,需要linux 2.4.18 kernel include,編譯完成後產生led module。 insmod main.o //安裝模組 mknod /dev/leds c 221 0 使用方法: int main(int argc, char *argv[]) { int testdev //led test... testdev = open("/dev/QuickMarkLed",O_RDWR) ioctl(testdev, 2, 1) //ioctl(device, led number, open/close) open=1 ioctl(testdev, argv[1][0]- 0 , argv[2][0]- 0 ) //ioctl(device, led number, open/close) open=1 close(testdev) return 0 }
标签: s3c2440 driver Linux dev-C
上传时间: 2014-01-01
上传用户:qlpqlq
The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisidec] intended for decoding all current and future Vorbis I compliant streams. The Tremor libvorbisidec library exposes an API intended to be as similar as possible to the familiar vorbisfile library included with the open source Vorbis reference libraries distributed for free by Xiph.org. Tremor can be used along with any ANSI compliant stdio implementation for file/stream access, or use custom stream i/o routines provided by the embedded environment. Both uses are described in detail in this documentation.
标签: integer-only embeddable libvorbisi provides
上传时间: 2013-12-25
上传用户:lindor
The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisidec] intended for decoding all current and future Vorbis I compliant streams. The Tremor libvorbisidec library exposes an API intended to be as similar as possible to the familiar vorbisfile library included with the open source Vorbis reference libraries distributed for free by Xiph.org. ogg vorbis decoder, evc project Tremor can be used along with any ANSI compliant stdio implementation for file/stream access, or use custom stream i/o routines provided by the embedded environment. Both uses are described in detail in this documentation.
标签: integer-only embeddable libvorbisi provides
上传时间: 2016-01-21
上传用户:gengxiaochao
AES for BCB5/6 控件 安装: 1)展开XAES.ZIP 2)启动C++ Builder,菜单: File --> Open Project -->(定位到你展开的目录)--> 根据你的编译器版本,找到Release下对应的XAes_CB5.bpk或者XAes_CB6.bpk,打开! 3)选择Compile,编译完成后点击“Install”,Aes控件将安装到控件板的Netsys页上。
上传时间: 2014-01-15
上传用户:hxy200501
To date tests are still the best solution mankind has found to deliver working software. This book is the sum of four years of research and practice in the testing field. The practice comes from my IT consulting background, first at Octo Technology and then at Pivolis the research comes from my involvement with open source development at night and on weekends.
标签: solution software mankind deliver
上传时间: 2014-01-11
上传用户:sclyutian
GIS系统支持库Geospatial Data Abstraction Library代码.GDAL is a translator library for raster geospatial data formats that is released under an X/MIT style Open Source license by the Open Source Geospatial
标签: Abstraction Geospatial geospatial translator
上传时间: 2014-01-01
上传用户:sclyutian
aDABOOST This package contains the following files: learner.jar - is a platform independent java package. In order to run it on windows/linux open the command prompt/shell and type the command "java -jar learner.jar". Make sure the java installation path is set in the system enviroment. learner.exe - A windows executable version of the application. Doubleclick to run. learner.pdf - The digital version of the report. SRC\ - The source code of the program is in this directory
标签: independent following aDABOOST contains
上传时间: 2014-12-05
上传用户:xsnjzljj
//构造具有指定的标签的菜单 files = new Menu("文件(F)") compile = new Menu("编辑(E)") see = new Menu("查看(V)") format = new Menu("格式(O)") font = new Menu("字体和颜色(F)...") //在格式菜单下再添加一个字体及颜色的菜单 help = new Menu("帮助(H)") //构造具有指定的标签的菜单项 news = new MenuItem("新建(N)" + " " + "Ctrl+N") open = new MenuItem("打开(O)..." + " " + "Ctrl+O") save = new MenuItem("保存(S)" + " " + "Ctrl+S") other = new MenuItem("另存为(A)...") page = new MenuItem("页面设置(U)...") mim = new MenuItem("打印(P)..." + " " + "Ctrl+P") quit = new MenuItem("退出(X)")
上传时间: 2016-02-27
上传用户:小儒尼尼奥
一、目的要求 1、用高级语言编写和调试一个简单的文件系统,模拟文件管理的工作过程。从而对各种文件操作命令的实质内容和执行过程有比较深入的了解。 2、要求设计一个 n个用户的文件系统,每次用户可保存m个文件,用户在一次运行中只能打开一个文件,对文件必须设置保护措施,且至少有Create、delete、open、close、read、write等命令。
上传时间: 2014-10-10
上传用户:fredguo