mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Merge RFM autogsdoc changes from trunk/HEAD
Use encoded c-strings in Tools and Testing git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/mswin-ng@23988 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3220eb94bd
commit
dee0872aed
18 changed files with 80 additions and 53 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2006-10-29 Sheldon Gill <sheldon@westnet.net.au>
|
||||
|
||||
* Tools\AGSHtml.m
|
||||
* Tools\AGSParser.m
|
||||
* Tools\AGSOutput.m
|
||||
* Tools\autogsdoc.m
|
||||
Merge RFM changes from trunk/HEAD
|
||||
|
||||
* Testing\tcpport-client.m
|
||||
* Testing\nsconnection_server.m
|
||||
* Testing\exported-strings.m
|
||||
* Testing\nsprocessinfo.m
|
||||
* Tools\xmlparse.m
|
||||
* Tools\defaults.m
|
||||
* Tools\locale_alias.m
|
||||
* Tools\Makefile.preamble
|
||||
* Tools\make_strings\make_strings.m
|
||||
* Tools\pl.m
|
||||
Use encoded c-strings
|
||||
|
||||
2006-10-29 Sheldon Gill <sheldon@westnet.net.au>
|
||||
|
||||
* Source/GSArray.h: added
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02111 USA.
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02111 USA.
|
||||
|
||||
AutogsdocSource: NSError.m
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
|
||||
<title>NSPathUtilities function reference</title>
|
||||
<title>Additional Utilities function reference</title>
|
||||
$Date$ $Revision$
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** Implementation for NSProcessInfo for GNUStep
|
||||
Copyright (C) 1995-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2006 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Georg Tuparev <Tuparev@EMBL-Heidelberg.de>
|
||||
Heidelberg, Germany
|
||||
|
@ -545,7 +545,7 @@ static char **_gnu_noobjc_env = NULL;
|
|||
"Please check the linking process\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
/* copy the environment strings */
|
||||
for (count = 0; vectors[count]; count++)
|
||||
;
|
||||
|
@ -997,9 +997,9 @@ int main(int argc, char *argv[], char *env[])
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the operating system in use.<br>
|
||||
* Returns the name of the operating system in use.<br />
|
||||
* OpenStep/Cocoa return a string representation of the operatingSystem
|
||||
* constant. MacOS-X will always return @"NSMACHOperatingSystem"<br/>
|
||||
* constant. MacOS-X will always return @"NSMACHOperatingSystem".<br />
|
||||
* This implementation is different in that it will return the
|
||||
* name of the operating system. (eg "Linux", "Darwin", "FreeBSD")
|
||||
*/
|
||||
|
@ -1025,13 +1025,13 @@ int main(int argc, char *argv[], char *env[])
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a localised string with the name and version information about the
|
||||
* operating system on which the process is running. The string is designed
|
||||
* <p>Returns a localised string with the name and version information about
|
||||
* the operating system on which the process is running. The string is designed
|
||||
* to be read by a human and shouldn't be used by an application to determine
|
||||
* details about the host operating system.<p>
|
||||
* details about the host operating system.</p>
|
||||
*
|
||||
* Known Bugs: No localisation support yet
|
||||
* <introduced/>MacOS 10.2, Base 1.14</introduced>
|
||||
* Known Bugs: No localisation support yet<br />
|
||||
* Introduced: MacOS 10.2, Base 1.14
|
||||
*/
|
||||
- (NSString *) operatingSystemVersionString
|
||||
{
|
||||
|
@ -1082,7 +1082,7 @@ int main(int argc, char *argv[], char *env[])
|
|||
/**
|
||||
* Change the name of the current process to newName. The newName is used
|
||||
* by the GNUstep libraries but it will not change the name of the binary
|
||||
* being executed.<br>
|
||||
* being executed.<br />
|
||||
* Use this carefully as other objects use this in their functionality, for
|
||||
* example: NSUserDefaults
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#define MyAssert2(IDENT) do { \
|
||||
NSCAssert2([IDENT isEqual: \
|
||||
[NSString stringWithCString: #IDENT]], \
|
||||
[NSString stringWithUTF8String: #IDENT]], \
|
||||
@"Invalid value: %@ for: %s", \
|
||||
IDENT, #IDENT); \
|
||||
NSCAssert2([cache[i++] isEqual: IDENT], \
|
||||
|
@ -55,9 +55,6 @@ main()
|
|||
MyAssert1(NSWillBecomeMultiThreadedNotification);
|
||||
MyAssert1(NSThreadDidStartNotification);
|
||||
MyAssert1(NSThreadWillExitNotification);
|
||||
// MyAssert1(PortBecameInvalidNotification);
|
||||
// MyAssert1(InPortClientBecameInvalidNotification);
|
||||
// MyAssert1(InPortAcceptedClientNotification);
|
||||
MyAssert1(NSPortDidBecomeInvalidNotification);
|
||||
MyAssert1(NSConnectionReplyMode);
|
||||
MyAssert1(NSBundleDidLoadNotification);
|
||||
|
@ -118,9 +115,6 @@ main()
|
|||
MyAssert2(NSWillBecomeMultiThreadedNotification);
|
||||
MyAssert2(NSThreadDidStartNotification);
|
||||
MyAssert2(NSThreadWillExitNotification);
|
||||
// MyAssert2(PortBecameInvalidNotification);
|
||||
// MyAssert2(InPortClientBecameInvalidNotification);
|
||||
// MyAssert2(InPortAcceptedClientNotification);
|
||||
MyAssert2(NSPortDidBecomeInvalidNotification);
|
||||
MyAssert2(NSConnectionReplyMode);
|
||||
MyAssert2(NSBundleDidLoadNotification);
|
||||
|
|
|
@ -522,7 +522,7 @@ int main(int argc, char *argv[], char **env)
|
|||
[c setRootObject: l];
|
||||
|
||||
if (optind < argc)
|
||||
[c registerName: [NSString stringWithCString: argv[optind]]];
|
||||
[c registerName: [NSString stringWithUTF8String: argv[optind]]];
|
||||
else
|
||||
[c registerName: @"test2server"];
|
||||
|
||||
|
|
|
@ -23,24 +23,25 @@ int main(int argc, char *argv[])
|
|||
NSString* aKey;
|
||||
NSEnumerator* enumerator;
|
||||
|
||||
printf("Host name: %s\n",[[pi hostName] cString]);
|
||||
printf("Host name: %s\n",[[pi hostName] UTF8String]);
|
||||
printf("Operating system: %d\n",[pi operatingSystem]);
|
||||
printf("Operating system name: %s\n",[[pi operatingSystemName] cString]);
|
||||
printf("Process Name: %s\n",[[pi processName] cString]);
|
||||
printf("Globally Unique String: %s\n",[[pi globallyUniqueString] cString]);
|
||||
printf("Operating system name: %s\n",[[pi operatingSystemName] UTF8String]);
|
||||
printf("Operating system version: %s\n",[[pi operatingSystemVersionString] UTF8String]);
|
||||
printf("Process Name: %s\n",[[pi processName] UTF8String]);
|
||||
printf("Globally Unique String: %s\n",[[pi globallyUniqueString] UTF8String]);
|
||||
|
||||
printf("\nProcess arguments\n");
|
||||
printf("%d argument(s)\n", [[pi arguments] count]);
|
||||
enumerator = [[pi arguments] objectEnumerator];
|
||||
while ((aString = [enumerator nextObject]))
|
||||
printf("-->%s\n",[aString cString]);
|
||||
printf("-->%s\n",[aString UTF8String]);
|
||||
|
||||
printf("\nProcess environment\n");
|
||||
printf("%d environment variables(s)\n", [[pi environment] count]);
|
||||
enumerator = [[pi environment] keyEnumerator];
|
||||
while ((aKey = [enumerator nextObject]))
|
||||
printf("++>%s=%s\n",[aKey cString],[[[pi environment]
|
||||
objectForKey:aKey] cString]);
|
||||
printf("++>%s=%s\n",[aKey UTF8String],[[[pi environment]
|
||||
objectForKey:aKey] UTF8String]);
|
||||
|
||||
[arp release];
|
||||
exit(0);
|
||||
|
|
|
@ -33,7 +33,7 @@ int main (int argc, char *argv[])
|
|||
|
||||
if (argc > 1)
|
||||
out_port = [TcpOutPort newForSendingToRegisteredName:
|
||||
[NSString stringWithCString: argv[1]]
|
||||
[NSString stringWithUTF8String: argv[1]]
|
||||
onHost: @"localhost"];
|
||||
else
|
||||
out_port = [TcpOutPort newForSendingToRegisteredName: @"tcpport-test"
|
||||
|
|
|
@ -2493,8 +2493,11 @@ static NSString *mainFont = nil;
|
|||
{
|
||||
[buf appendString: @", "];
|
||||
[buf appendString: project];
|
||||
[buf appendString: @" "];
|
||||
[buf appendString: gvadd];
|
||||
if ([gvadd isEqualToString: @"0.0.0"] == NO)
|
||||
{
|
||||
[buf appendString: @" "];
|
||||
[buf appendString: gvadd];
|
||||
}
|
||||
if ([gvdep length] > 0)
|
||||
{
|
||||
[buf appendString: @" deprecated at "];
|
||||
|
@ -2502,7 +2505,7 @@ static NSString *mainFont = nil;
|
|||
}
|
||||
if ([gvrem length] > 0)
|
||||
{
|
||||
[buf appendString: @" removed at "];
|
||||
[buf appendString: @" deprecated for removal at "];
|
||||
[buf appendString: gvrem];
|
||||
}
|
||||
}
|
||||
|
@ -2515,8 +2518,11 @@ static NSString *mainFont = nil;
|
|||
[buf appendString: @"<div class=\"availability\">\n"];
|
||||
[buf appendString: @"<b>Availability:</b> "];
|
||||
[buf appendString: project];
|
||||
[buf appendString: @" "];
|
||||
[buf appendString: gvadd];
|
||||
if ([gvadd isEqualToString: @"0.0.0"] == NO)
|
||||
{
|
||||
[buf appendString: @" "];
|
||||
[buf appendString: gvadd];
|
||||
}
|
||||
if ([gvdep length] > 0)
|
||||
{
|
||||
[buf appendString: @" deprecated at "];
|
||||
|
@ -2525,7 +2531,7 @@ static NSString *mainFont = nil;
|
|||
[buf appendString: @"<br />\n"];
|
||||
if ([gvrem length] > 0)
|
||||
{
|
||||
[buf appendString: @" removed at "];
|
||||
[buf appendString: @" deprecated for removal at "];
|
||||
[buf appendString: gvrem];
|
||||
}
|
||||
[buf appendString:@"</div>\n"];
|
||||
|
|
|
@ -2335,7 +2335,7 @@ static BOOL snuggleStart(NSString *t)
|
|||
[str appendString: @"<?xml version=\"1.0\"?>\n"];
|
||||
[str appendString: @"<!DOCTYPE gsdoc PUBLIC "];
|
||||
[str appendString: @"\"-//GNUstep//DTD gsdoc 1.0.1//EN\" "];
|
||||
[str appendString: @"\"http://www.gnustep.org/gsdoc-1_0_1.xml\">\n"];
|
||||
[str appendString: @"\"http://www.gnustep.org/gsdoc-1_0_3.xml\">\n"];
|
||||
[str appendString: @"<gsdoc base=\""];
|
||||
[str appendString: [name lastPathComponent]];
|
||||
/*
|
||||
|
|
|
@ -1549,6 +1549,7 @@
|
|||
return nil;
|
||||
}
|
||||
}
|
||||
[self setStandards: d];
|
||||
return d;
|
||||
}
|
||||
else
|
||||
|
@ -2314,6 +2315,7 @@ fail:
|
|||
DESTROY(dict);
|
||||
}
|
||||
RELEASE(a);
|
||||
[self setStandards: dict];
|
||||
return AUTORELEASE(dict);
|
||||
}
|
||||
|
||||
|
@ -2333,11 +2335,11 @@ fail:
|
|||
method = [[NSMutableDictionary alloc] initWithCapacity: 4];
|
||||
if (buffer[pos++] == '-')
|
||||
{
|
||||
mname = [NSMutableString stringWithCString: "-"];
|
||||
mname = [NSMutableString stringWithUTF8String: "-"];
|
||||
}
|
||||
else
|
||||
{
|
||||
mname = [NSMutableString stringWithCString: "+"];
|
||||
mname = [NSMutableString stringWithUTF8String: "+"];
|
||||
}
|
||||
[method setObject: sels forKey: @"Sels"]; // Parts of selector.
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
||||
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
# Boston, MA 02111 USA.
|
||||
#
|
||||
|
||||
#
|
||||
|
|
|
@ -547,7 +547,7 @@
|
|||
<example>
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN"
|
||||
"http://www.gnustep.org/gsdoc-1_0_1.xml">
|
||||
"http://www.gnustep.org/gsdoc-1_0_3.xml">
|
||||
<gsdoc base="index">
|
||||
<head>
|
||||
<title>My project reference</title>
|
||||
|
@ -599,6 +599,8 @@
|
|||
#include "AGSIndex.h"
|
||||
#include "AGSHtml.h"
|
||||
#include "GNUstepBase/GNUstep.h"
|
||||
#include "GNUstepBase/GSFunctions.h"
|
||||
|
||||
#ifdef NeXT_Foundation_LIBRARY
|
||||
#include "GNUstepBase/GSCategories.h"
|
||||
#endif
|
||||
|
@ -1774,7 +1776,7 @@ main(int argc, char **argv, char **env)
|
|||
|
||||
// skeleton for table of contents files
|
||||
[tocSkel setString: @"<?xml version=\"1.0\"?>\n"
|
||||
@"<!DOCTYPE gsdoc PUBLIC \"-//GNUstep//DTD gsdoc 1.0.1//EN\" \"http://www.gnustep.org/gsdoc-1_0_1.xml\">\n"
|
||||
@"<!DOCTYPE gsdoc PUBLIC \"-//GNUstep//DTD gsdoc 1.0.1//EN\" \"http://www.gnustep.org/gsdoc-1_0_3.xml\">\n"
|
||||
@"<gsdoc base=\"[typeU]\" stylesheeturl=\"gsdoc_contents\">\n"
|
||||
@" <head>\n"
|
||||
@" <title>[typeU]</title>\n"
|
||||
|
@ -1880,7 +1882,7 @@ main(int argc, char **argv, char **env)
|
|||
@"named %@ in the documentation output directory.\n"
|
||||
@"Then include this file in the arguments to autogsdoc.\n\n", prjFile);
|
||||
[prjFileContents setString: @"<?xml version=\"1.0\"?>\n"
|
||||
@"<!DOCTYPE gsdoc PUBLIC \"-//GNUstep//DTD gsdoc 1.0.1//EN\" \"http://www.gnustep.org/gsdoc-1_0_1.xml\">\n"
|
||||
@"<!DOCTYPE gsdoc PUBLIC \"-//GNUstep//DTD gsdoc 1.0.1//EN\" \"http://www.gnustep.org/gsdoc-1_0_3.xml\">\n"
|
||||
@"<gsdoc base=\"[prjName]\">\n"
|
||||
@" <head>\n"
|
||||
@" <title>The [prjName] Project</title>\n"
|
||||
|
|
|
@ -62,7 +62,7 @@ static NSString *input(char **ptr)
|
|||
{
|
||||
tmp[-1] = '\0';
|
||||
*ptr = tmp;
|
||||
result = [NSString stringWithCString: start];
|
||||
result = [NSString stringWithUTF8String: start];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ static NSString *input(char **ptr)
|
|||
}
|
||||
*tmp++ = '\0';
|
||||
*ptr = tmp;
|
||||
result = [NSString stringWithCString: start];
|
||||
result = [NSString stringWithUTF8String: start];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -64,12 +64,12 @@ loc_read_file(const char *dir, const char *file)
|
|||
if (strlen(country) > 0 && strcmp(country, language) != 0)
|
||||
{
|
||||
strcat(country, language);
|
||||
[dict setObject: [NSString stringWithCString: country]
|
||||
forKey: [NSString stringWithCString: locale]];
|
||||
[dict setObject: [NSString stringWithUTF8String: country]
|
||||
forKey: [NSString stringWithUTF8String: locale]];
|
||||
}
|
||||
locale[2] = '\0';
|
||||
[dict setObject: [NSString stringWithCString: language]
|
||||
forKey: [NSString stringWithCString: locale]];
|
||||
[dict setObject: [NSString stringWithUTF8String: language]
|
||||
forKey: [NSString stringWithUTF8String: locale]];
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -135,13 +135,14 @@ static int ParseFile(const char *filename,NSMutableDictionary *tables)
|
|||
}
|
||||
|
||||
|
||||
filenamestr=[NSString stringWithCString: filename];
|
||||
filenamestr = [NSString stringWithCString: filename
|
||||
encoding: [NSString defaultCStringEncoding]];
|
||||
if (verbose)
|
||||
printf("Parsing '%s'.\n", [filenamestr cString]);
|
||||
printf("Parsing '%s'.\n", filename);
|
||||
f=fopen(filename,"rt");
|
||||
if (!f)
|
||||
{
|
||||
NSLog(@"Unable to open '%s': %m\n",filename);
|
||||
NSLog(@"Unable to open '%@': %m\n",filenamestr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ id process_plist(NSData *inputData)
|
|||
NSString *string = nil;
|
||||
|
||||
// Initialize a string with the contents of the file.
|
||||
string = [NSString stringWithCString: (char *)[inputData bytes]];
|
||||
string = [NSString stringWithUTF8String: (char *)[inputData bytes]];
|
||||
|
||||
// Convert the string into a property list. If there is a parsing error
|
||||
// the property list interpreter will throw an exception.
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
{
|
||||
buf[--len] = '\0';
|
||||
}
|
||||
str = [NSString stringWithCString: buf];
|
||||
str = [NSString stringWithUTF8String: buf];
|
||||
return str;
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue