MCPcopy Create free account
hub / github.com/NetHack/NetHack / vms_creat

Function vms_creat

sys/vms/vmsfiles.c:123–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 */
122#undef creat
123int
124vms_creat(const char *file, unsigned int mode)
125{
126 char filnambuf[BUFSIZ]; /*(not BUFSZ)*/
127
128 if (strchr(file, ';')) {
129 /* assumes remove or delete, not vms_unlink */
130 if (!unlink(file)) {
131 (void) sleep(1);
132 (void) unlink(file);
133 }
134 } else if (!strchr(file, '.')) {
135 /* force some punctuation to be present */
136 file = strcat(strcpy(filnambuf, file), ".");
137 }
138 return creat(file, mode, "shr=nil", "mbc=32", "mbf=2", "rop=wbh");
139}
140
141/*
142 Similar substitute for open() -- if an open attempt fails due to being

Callers

nothing calls this directly

Calls 2

unlinkFunction · 0.85
creatFunction · 0.85

Tested by

no test coverage detected