[Frugalware-darcs] setup-current: moved copyfile() from configsource to util

VMiklos vmiklos at frugalware.org
Thu Mar 16 18:08:13 CET 2006


[moved copyfile() from configsource to util
VMiklos <vmiklos at frugalware.org>**20051119002030] {
hunk ./src/plugins/configsource.c 48
-
-int copyfile(char *src, char *dest)
-{
-	FILE *in, *out;
-	size_t len;
-	char buf[4097];
-
-	in = fopen(src, "r");
-	if(in == NULL)
-		return(1);
-
-	out = fopen(dest, "w");
-	if(out == NULL)
-		return(1);
-
-	while((len = fread(buf, 1, 4096, in)))
-		fwrite(buf, 1, len, out);
-
-	fclose(in);
-	fclose(out);
-	return(0);
-}
hunk ./src/util.c 120
+
+int copyfile(char *src, char *dest)
+{
+	FILE *in, *out;
+	size_t len;
+	char buf[4097];
+
+	in = fopen(src, "r");
+	if(in == NULL)
+		return(1);
+
+	out = fopen(dest, "w");
+	if(out == NULL)
+		return(1);
+
+	while((len = fread(buf, 1, 4096, in)))
+		fwrite(buf, 1, len, out);
+
+	fclose(in);
+	fclose(out);
+	return(0);
+}
+
hunk ./src/util.h 40
+int copyfile(char *src, char *dest);
}


More information about the Frugalware-darcs mailing list