/************************************************************************ * * * Copyright Digital Equipment Corporation 1998. All rights reserved. * * * * Restricted Rights: Use, duplication, or disclosure by the U.S. * * Government is subject to restrictions as set forth in subparagraph * * (c) (1) (ii) of DFARS 252.227-7013, or in FAR 52.227-19, or in FAR * * 52.227-14 Alt. III, as applicable. * * * * This software is proprietary to and embodies the confidential * * technology of Digital Equipment Corporation. Possession, use, or * * copying of this software and media is authorized only pursuant to a * * valid written license from Digital or an authorized sublicensor. * * * ************************************************************************/ /* open_example.c */ #include #include #include main() { int file, stat; int flags; flags = O_RDWR; /* Open for read and write, */ /* with user default file protection, */ /* with max fixed record size of 2048, */ /* and a block size of 2048 bytes. */ file = open("file.dat", flags, 0, "rfm=fix", "mrs=2048", "bls=2048"); if (file == -1) perror("OPEN error"), exit(1); close(file); }