file.c: move getcwd parser to a separate file

* getcwd.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_getcwd): Move to getcwd.c.
diff --git a/Makefile.am b/Makefile.am
index 54d1205..f7e477a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,7 @@
 	fallocate.c	\
 	fanotify.c	\
 	file.c		\
+	getcwd.c	\
 	inotify.c	\
 	io.c		\
 	ioctl.c		\
diff --git a/file.c b/file.c
index 48212ec..f13f613 100644
--- a/file.c
+++ b/file.c
@@ -1668,16 +1668,3 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_mknod(tcp, 1);
 }
-
-int
-sys_getcwd(struct tcb *tcp)
-{
-	if (exiting(tcp)) {
-		if (syserror(tcp))
-			tprintf("%#lx", tcp->u_arg[0]);
-		else
-			printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1);
-		tprintf(", %lu", tcp->u_arg[1]);
-	}
-	return 0;
-}
diff --git a/getcwd.c b/getcwd.c
new file mode 100644
index 0000000..1b97448
--- /dev/null
+++ b/getcwd.c
@@ -0,0 +1,14 @@
+#include "defs.h"
+
+int
+sys_getcwd(struct tcb *tcp)
+{
+	if (exiting(tcp)) {
+		if (syserror(tcp))
+			tprintf("%#lx", tcp->u_arg[0]);
+		else
+			printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1);
+		tprintf(", %lu", tcp->u_arg[1]);
+	}
+	return 0;
+}