Changeset 8174
- Timestamp:
- Aug 4, 2006, 3:59:17 PM (20 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 2 edited
-
include/shell.h (modified) (1 diff)
-
lib.shell/version.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/include/shell.h
r7938 r8174 123 123 int write_fmt (int fd, char *format, ...); 124 124 char *opihi_version (); 125 char *strip_version (char *input); 125 126 126 127 /*** gprint defines ***/ -
trunk/Ohana/src/opihi/lib.shell/version.c
r4748 r8174 1 1 # include "shell.h" 2 2 3 static char *unknown = "UNKNOWN"; 3 4 static char *name = "$Name: not supported by cvs2svn $"; 4 5 … … 6 7 return (name); 7 8 } 9 10 /* expect a line of the form "$Name: not supported by cvs2svn $", strip out contents */ 11 char *strip_version (char *input) { 12 13 char *p, *q; 14 15 p = strcasestr (input, "$NAME:"); 16 if (p == NULL) return (unknown); 17 18 q = strcreate (input + 6); 19 p = strrchr (q, '$'); 20 if (p != NULL) *p = 0; 21 stripwhite (q); 22 if (*q == 0) { 23 free (q); 24 q = strcreate ("NONE"); 25 } 26 27 return (q); 28 }
Note:
See TracChangeset
for help on using the changeset viewer.
