Welcome![Sign In][Sign Up]
Location:
Search - fcntl.h

Search list

[Other4

Description: 学会对文件的记录锁定,及解锁。#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
Platform: | Size: 9297 | Author: 华羿 | Hits:

[Linux-UnixLinuxUART

Description: linux 下串口编程 #include <stdio.h> /*标准输入输出定义*/ #include <stdlib.h> /*标准函数库定义*/ #include <unistd.h> /*Unix标准函数定义*/ #include <sys/types.h> /**/ #include <sys/stat.h> /**/ #include <fcntl.h> /*文件控制定义*/ #include <termios.h> /*PPSIX终端控制定义*/ #include <errno.h> /*错误号定义*/ /***@brief 设置串口通信速率 *@param fd 类型 int 打开串口的文件句柄 *@param speed 类型 int 串口速度 *@return void*/
Platform: | Size: 5289 | Author: Edward | Hits:

[Other Embeded programjl

Description: Borland c++编写,适合于兰德公司掌上电脑通讯程序
Platform: | Size: 374784 | Author: jinsheng.qi | Hits:

[Other4

Description: 学会对文件的记录锁定,及解锁。#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
Platform: | Size: 9216 | Author: 华羿 | Hits:

[Linux-UnixLinuxUART

Description: linux 下串口编程 #include <stdio.h> /*标准输入输出定义*/ #include <stdlib.h> /*标准函数库定义*/ #include <unistd.h> /*Unix标准函数定义*/ #include <sys/types.h> /**/ #include <sys/stat.h> /**/ #include <fcntl.h> /*文件控制定义*/ #include <termios.h> /*PPSIX终端控制定义*/ #include <errno.h> /*错误号定义*/ /***@brief 设置串口通信速率 *@param fd 类型 int 打开串口的文件句柄 *@param speed 类型 int 串口速度 *@return void*/ -linux serial port programming under# include
Platform: | Size: 5120 | Author: Edward | Hits:

[Linux-Unixframebuffer

Description: 帧缓冲#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <asm/page.h> #include <linux/fb.h> #define TRUE 1 #define FALSE 2 //a framebuffer device structure typedef struct fbdev{ int fb unsigned long fb_mem_offset unsigned long fb_mem struct fb_fix_screeninfo fb_fix -Frame buffer# Include <stdio.h># Include <stdlib.h># Include <string.h># Include <stdint.h># Include <unistd.h># Include <fcntl.h># include <sys/ioctl.h># include <sys/mman.h># include <asm/page.h># include <linux/fb.h># define TRUE 1# define FALSE 2// a framebuffer device structure typedef struct fbdev (int fb unsigned long fb_mem_offset unsigned long fb_mem struct fb_fix_screeninfo fb_fix
Platform: | Size: 1024 | Author: hjintian | Hits:

[Communication-Mobileserial

Description: include <stdio.h> /*标准输入输出定义*/ #include <stdlib.h> /*标准函数库定义*/ #include <unistd.h> /*Unix标准函数定义*/ #include <sys/types.h> /**/ #include <sys/stat.h> /**/ #include <fcntl.h> /*文件控制定义*/ #include <termios.h> /*PPSIX终端控制定义*/ #include <errno.h> /*错误号定义*/ #define TRUE 1 #define FALSE 0 /***@brief 设置串口通信速率 *@-include <stdio.h>/* Standard input and output definitions* /# include <stdlib.h>/* Standard function library definition* /# include <unistd.h>/* Unix standard function definition* /# include <sys/types.h>/** /# Include <sys/stat.h>/** /# Include <fcntl.h>/* File control definition* /# include <termios.h>/* PPSIX terminal control definitions* /# include <errno.h>/* Error number definitions* /# define TRUE 1# define FALSE 0 /***brief set of serial communication rate* @
Platform: | Size: 9216 | Author: nameblue | Hits:

[Sniffer Package capturefirm

Description: Bluetooth xfu flash #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <err.h> #include <string.h> #include <assert.h> #include <stdarg.h> #include "dfu.h"
Platform: | Size: 5120 | Author: ulego | Hits:

[Embeded LinuxCmicroblaze

Description: #include "xgpio_l.h" #include "xutil.h" --- ----- #include "xparameters.h" #include "xgpio_l.h" #include "xutil.h" #include <stdio.h> #include <fcntl.h> int main (void)-#include "xgpio_l.h" #include "xutil.h" ----------- #include "xparameters.h" #include "xgpio_l.h" #include "xutil.h" #include <stdio.h> #include <fcntl.h> int main (void)
Platform: | Size: 1024 | Author: youssef | Hits:

[Linux-UnixLinux-serial

Description: Linux 系统串口使用代码 /* * Program: serial.c * Author: Paul Dean * Version: 0.0.3 * Date: 2002-02-19 * Description: To provide underlying serial port function, * for high level applications. * */ #include <termios.h> /* tcgetattr, tcsetattr */ #include <stdio.h> /* perror, printf, puts, fprintf, fputs */ #include <unistd.h> /* read, write, close */ #include <fcntl.h> /* open */ #include <sys/signal.h> #include <sys/types.h> #include <string.h> /* bzero, memcpy */ #include <limits.h> /* CHAR_MAX */ #include "vardef.h" /* INT32, INT16, INT8, UINT32, UINT16, UINT8 */ #include "serial.h"-This directory contains the version 0.0.4 release of the Serial Debugger (SDB). The SDB is free software. If you think it is useful in your applications or solutions, you are admitted to use this source code with the declaration of Copyright to the original author, now Ding Baohua. Install procedure is referred to INSTALL file.
Platform: | Size: 8192 | Author: zhangxiaojun | Hits:

[Dialog_WindowBGI-putin

Description: 第三方BGI使用测试例程,#include "graphics.h" #include "Svga256.h" #include "stdio.h" #include "fcntl.h" #include "malloc.h" #include "io.h"-the third BGI testing examples,#include "graphics.h" #include "Svga256.h" #include "stdio.h" #include "fcntl.h" #include "malloc.h" #include "io.h"
Platform: | Size: 26624 | Author: liuga | Hits:

[Internet-NetworkLinux-ping

Description: Linux-ping源代码,e "stdlib.h" #include "string.h" #include "stdio.h"-e "stdlib.h" #include "string.h" #include "stdio.h" #include "fcntl.h" #include "errno.h" #include "signal.h" #include "sys/types.h" #include "sys/socket.h" #include "sys/time.h" #include "netinet/in.h" #include "arpa/inet.h"
Platform: | Size: 2048 | Author: wxk1383 | Hits:

[Linux-UnixADTest

Description: 6410 ADC测试 #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <linux/fs.h> #include <errno.h> #include <string.h> #include <qlineedit.h> #include <qmessagebox.h> -6410 test #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <linux/fs.h> #include <errno.h> #include <string.h> #include <qlineedit.h> #include <qmessagebox.h>
Platform: | Size: 64512 | Author: xiankongyijue | Hits:

[Linux-Unixled-test

Description: 6410 led测试 include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <linux/ioctl.h> /* 瀹氫箟骞绘暟 */ #define MEMDEV_IOC_MAGIC k -include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <linux/ioctl.h> /* 瀹氫箟骞绘暟*/ #define MEMDEV_IOC_MAGIC k
Platform: | Size: 3072 | Author: xiankongyijue | Hits:

[Linux driverwarehose

Description: linux下的仓库物联网系统 linux下的仓库物联网系统 linux下的仓库物联网系统 -#include<stdio.h> #include<sys/types.h> #include<sys/ipc.h> #include<sys/msg.h> #include<stdlib.h> #include<unistd.h> #include<string.h> #include<pthread.h> #include <sys/ioctl.h> #include <fcntl.h> #include<stdio.h> #include<stdlib.h> #include<sys/types.h> #include<unistd.h> #include<sys/ipc.h> #include<sys/shm.h> #include<signal.h> #include<inttypes.h> #include<sys/sem.h>
Platform: | Size: 4096 | Author: sunguangjiang | Hits:

[Linux-Unix004-define-recursive

Description: Write fcntl.h here, not <fcntl.h>, otherwise OSF 1 5.1 DTK cc eliminates this include because of the preliminary include <fcntl.h> above. -Write fcntl.h here, not <fcntl.h>, otherwise OSF 1 5.1 DTK cc eliminates this include because of the preliminary include <fcntl.h> above.
Platform: | Size: 5120 | Author: nangwuewie | Hits:

[Linux-Unixstartup

Description: de <sys fcntl.h> include startup.h include <ctype.h> include <sys typ Device Driver for linux. -de <sys fcntl.h> include startup.h include <ctype.h> include <sys typ Device Driver for linux.
Platform: | Size: 9216 | Author: yxfudao | Hits:

CodeBus www.codebus.net