projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c9175f
)
Research V5 development
author
Ken Thompson
<ken@research.uucp>
Tue, 26 Nov 1974 23:13:21 +0000
(18:13 -0500)
committer
Ken Thompson
<ken@research.uucp>
Tue, 26 Nov 1974 23:13:21 +0000
(18:13 -0500)
Work on file usr/source/s4/perror.c
Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
Synthesized-from: v5
usr/source/s4/perror.c
[new file with mode: 0644]
patch
|
blob
diff --git a/usr/source/s4/perror.c
b/usr/source/s4/perror.c
new file mode 100644
(file)
index 0000000..
e9e6dc1
--- /dev/null
+++ b/
usr/source/s4/perror.c
@@ -0,0
+1,15
@@
+int errno;
+int sys_nerr;
+char *sys_errlist[];
+perror(s)
+char *s;
+{
+ char *c;
+
+ c = "Unknown error";
+ if(errno < sys_nerr)
+ c = sys_errlist[errno];
+ if(*s == '\0')
+ printf("%s", c); else
+ printf("%s: %s\n", s, c);
+}