mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-29 10:54:30 +00:00
Remove CR and usage. Improve / \ : detection.
This commit is contained in:
parent
dd79db4791
commit
a279fecaaa
68
ms/pc.c
68
ms/pc.c
@ -1,40 +1,28 @@
|
||||
/* OS/2 specific initialization */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
extern usage();
|
||||
extern char *program;
|
||||
extern const char version_string[];
|
||||
|
||||
void os2_initialize_main(int *pargc, char ***pargv)
|
||||
{
|
||||
if (*pargc == 1)
|
||||
{
|
||||
program = (*pargv)[0];
|
||||
printf ("\nGNU %s, version %s\n\n", program, version_string);
|
||||
usage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
_response(pargc, pargv);
|
||||
_wildcard(pargc, pargv);
|
||||
|
||||
_emxload_env("RCSLOAD");
|
||||
|
||||
setvbuf(stdout, NULL, _IOFBF, BUFSIZ);
|
||||
}
|
||||
|
||||
char *os2_filename_lastdirchar(const char *filename)
|
||||
{
|
||||
char *p = strrchr (filename, '/');
|
||||
|
||||
if (p == NULL)
|
||||
p = strrchr (filename, '\\');
|
||||
if (p == NULL)
|
||||
p = strrchr (filename, ':');
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/* OS/2 specific initialization */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void
|
||||
os2_initialize_main (int *pargc, char ***pargv)
|
||||
{
|
||||
_response (pargc, pargv);
|
||||
_wildcard (pargc, pargv);
|
||||
|
||||
_emxload_env ("RCSLOAD");
|
||||
|
||||
setvbuf (stdout, NULL, _IOFBF, BUFSIZ);
|
||||
}
|
||||
|
||||
char *
|
||||
os2_filename_lastdirchar (char const *filename)
|
||||
{
|
||||
char const *last = 0;
|
||||
|
||||
for (; *filename; filename++)
|
||||
if (*filename == '/' || *filename == '\\' || (*filename == ':' && !last))
|
||||
last = filename;
|
||||
|
||||
return (char *) last;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user