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

Function filecopy

sys/amiga/winreq.c:575–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575int
576filecopy(char *from, char *to)
577{
578 char *buf;
579 int i = 0;
580
581 buf = (char *) alloc(strlen(to) + strlen(from) + 20);
582 if (buf) {
583 sprintf(buf, "c:copy \"%s\" \"%s\" clone", from, to);
584
585/* Check SysBase instead? Shouldn't matter */
586#ifdef INTUI_NEW_LOOK
587 if (IntuitionBase->LibNode.lib_Version >= 37)
588 i = System(buf, NULL);
589 else
590#endif
591 Execute(buf, NULL, NULL);
592 free(buf);
593 } else {
594 return (-1);
595 }
596 return (i);
597}
598
599/* The colornames, and the default values for the pens */
600struct COLDEF {

Callers 1

EditColorFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected