CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - fcntl.h
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - fcntl.h - List
[
Other
]
4
DL : 0
学会对文件的记录锁定,及解锁。#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
Update
: 2008-10-13
Size
: 9.08kb
Publisher
:
华羿
[
Linux-Unix
]
LinuxUART
DL : 0
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*/
Update
: 2008-10-13
Size
: 5.17kb
Publisher
:
Edward
[
Other Embeded program
]
jl
DL : 0
Borland c++编写,适合于兰德公司掌上电脑通讯程序
Update
: 2025-02-17
Size
: 366kb
Publisher
:
jinsheng.qi
[
Other
]
4
DL : 0
学会对文件的记录锁定,及解锁。#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
Update
: 2025-02-17
Size
: 9kb
Publisher
:
华羿
[
Linux-Unix
]
LinuxUART
DL : 0
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
Update
: 2025-02-17
Size
: 5kb
Publisher
:
Edward
[
Linux-Unix
]
framebuffer
DL : 0
帧缓冲#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
Update
: 2025-02-17
Size
: 1kb
Publisher
:
hjintian
[
Communication-Mobile
]
serial
DL : 0
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* @
Update
: 2025-02-17
Size
: 9kb
Publisher
:
nameblue
[
Sniffer Package capture
]
firm
DL : 0
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"
Update
: 2025-02-17
Size
: 5kb
Publisher
:
ulego
[
Embeded Linux
]
Cmicroblaze
DL : 0
#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)
Update
: 2025-02-17
Size
: 1kb
Publisher
:
youssef
[
Linux-Unix
]
Linux-serial
DL : 0
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.
Update
: 2025-02-17
Size
: 8kb
Publisher
:
zhangxiaojun
[
Dialog_Window
]
BGI-putin
DL : 0
第三方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"
Update
: 2025-02-17
Size
: 26kb
Publisher
:
liuga
[
Internet-Network
]
Linux-ping
DL : 0
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"
Update
: 2025-02-17
Size
: 2kb
Publisher
:
wxk1383
[
Linux-Unix
]
ADTest
DL : 0
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>
Update
: 2025-02-17
Size
: 63kb
Publisher
:
xiankongyijue
[
Linux-Unix
]
led-test
DL : 0
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
Update
: 2025-02-17
Size
: 3kb
Publisher
:
xiankongyijue
[
Linux driver
]
warehose
DL : 0
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>
Update
: 2025-02-17
Size
: 4kb
Publisher
:
sunguangjiang
[
Linux-Unix
]
004-define-recursive
DL : 0
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.
Update
: 2025-02-17
Size
: 5kb
Publisher
:
nangwuewie
[
Linux-Unix
]
startup
DL : 0
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.
Update
: 2025-02-17
Size
: 9kb
Publisher
:
yxfudao
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.