* Tools/cvtenc.m (main): Write using local/set encoding when

EscapeIn=YES.
* Tools/gdomap.c: Remove getopt function for MinGW
(patch from Leigh Smith <leigh@leighsmith.com>).
* Documentation/coding-standards.texi: Add section about object
persistance.
* configure.ac: Make it possible to override --enable-pass-arguments
when on cygwin.
* configure: Regenerate using 2.57


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17698 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2003-09-22 03:00:21 +00:00
parent 0348f76414
commit 23990d5134
7 changed files with 2678 additions and 1636 deletions

View file

@ -229,6 +229,11 @@ main(int argc, char** argv, char **env)
myData = [[NSData alloc] initWithBytesNoCopy: c
length: o];
}
else if (eIn == YES)
{
myData = [myString dataUsingEncoding: iEnc
allowLossyConversion: NO];
}
else
{
myData = [myString dataUsingEncoding: oEnc

View file

@ -177,76 +177,6 @@ static void queue_probe(struct in_addr* to, struct in_addr *from,
int num_extras, struct in_addr* extra, int is_reply);
#ifdef __MINGW__
/* A simple implementation of getopt() */
static int
indexof(char c, char *string)
{
int i;
for (i = 0; i < strlen(string); i++)
{
if (string[i] == c)
{
return i;
}
}
return -1;
}
static char *optarg;
static char
getopt(int argc, char **argv, char *options)
{
static int argi;
static char *arg;
int index;
char retval = '\0';
optarg = NULL;
if (argi == 0)
{
argi = 1;
}
while (argi < argc)
{
arg = argv[argi];
if (strlen(arg) == 2)
{
if (arg[0] == '-')
{
if ((index = indexof(arg[1], options)) != -1)
{
retval = arg[1];
if (index < strlen(options))
{
if (options[index+1] == ':')
{
if (argi < argc-1)
{
argi++;
optarg = argv[argi];
}
else
{
return -1; /* ':' given, but argv exhausted */
}
}
}
}
}
}
argi++;
return retval;
}
return -1;
}
#endif
static char ebuf[2048];