1
0
mirror of http://mpg123.de/trunk/.git synced 2025-10-23 16:48:31 +03:00

Moved that replacement strdup to commpat.c, also check for it instead of assuming some specific system.

git-svn-id: svn://scm.orgis.org/mpg123/trunk@1594 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
thor
2008-10-08 08:16:35 +00:00
parent 717c2a4579
commit a76ae47854
4 changed files with 37 additions and 15 deletions

View File

@@ -10,23 +10,13 @@
#include <stdio.h>
#include "config.h"
#include "getlopt.h"
#include "compat.h"
#include "debug.h"
int loptind = 1; /* index in argv[] */
int loptchr = 0; /* index in argv[loptind] */
char *loptarg; /* points to argument if present, else to option */
#if defined(ultrix) || defined(ULTRIX)
char *strdup (char *src)
{
char *dest;
if (!(dest = (char *) malloc(strlen(src)+1)))
return (NULL);
return (strcpy(dest, src));
}
#endif
topt *findopt (int islong, char *opt, topt *opts)
{
if (!opts)