mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Fix some syntax errors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5c03d02192
commit
9d92b8cef3
4 changed files with 24 additions and 20 deletions
|
@ -26,6 +26,8 @@
|
||||||
#ifndef __Win32_Utilities_h_GNUSTEP_BASE_INCLUDE
|
#ifndef __Win32_Utilities_h_GNUSTEP_BASE_INCLUDE
|
||||||
#define __Win32_Utilities_h_GNUSTEP_BASE_INCLUDE
|
#define __Win32_Utilities_h_GNUSTEP_BASE_INCLUDE
|
||||||
|
|
||||||
|
#include <Foundation/NSString.h>
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
- Win32GetUserProfileDirectory()
|
- Win32GetUserProfileDirectory()
|
||||||
Find profile directory for non-current user.
|
Find profile directory for non-current user.
|
||||||
|
@ -56,4 +58,4 @@ NSString *Win32GetUserProfileDirectory(NSString *userName);
|
||||||
NSString *Win32FindDirectory( DWORD DirCLSID );
|
NSString *Win32FindDirectory( DWORD DirCLSID );
|
||||||
#endif /* defined(__WIN32__) */
|
#endif /* defined(__WIN32__) */
|
||||||
|
|
||||||
#endif /* */
|
#endif /* */
|
||||||
|
|
|
@ -32,7 +32,7 @@ SUBPROJECT_NAME = win32
|
||||||
win32_OBJC_FILES =\
|
win32_OBJC_FILES =\
|
||||||
GSRunLoopCtxt.m \
|
GSRunLoopCtxt.m \
|
||||||
GSRunLoopWatcher.m \
|
GSRunLoopWatcher.m \
|
||||||
NSRunLoopWin33.m \
|
NSRunLoopWin32.m \
|
||||||
Win32Support.m \
|
Win32Support.m \
|
||||||
Win32_Utilities.m
|
Win32_Utilities.m
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,15 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Win32_Utilities.h"
|
#include "GNUstepBase/Win32_Utilities.h"
|
||||||
//#include "Win32_FileManagement.h"
|
//#include "GNUstepBase/Win32_FileManagement.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform any and all necessary initialisation for supporting Win32
|
* Perform any and all necessary initialisation for supporting Win32
|
||||||
* Called after first part of library initialisation so some Obj-C is okay
|
* Called after first part of library initialisation so some Obj-C is okay
|
||||||
*/
|
*/
|
||||||
void Win32Initialise(void)
|
void
|
||||||
|
Win32Initialise(void)
|
||||||
{
|
{
|
||||||
/* We call the initialisation routines of all support modules in turn */
|
/* We call the initialisation routines of all support modules in turn */
|
||||||
Win32_Utilities_init();
|
Win32_Utilities_init();
|
||||||
|
@ -38,9 +39,10 @@ void Win32Initialise(void)
|
||||||
/*
|
/*
|
||||||
* Free and finalise all things for supporting Win32
|
* Free and finalise all things for supporting Win32
|
||||||
*/
|
*/
|
||||||
void Win32Finalise(void)
|
void
|
||||||
|
Win32Finalise(void)
|
||||||
{
|
{
|
||||||
/* We call the finalisation routines of all support modules in turn */
|
/* We call the finalisation routines of all support modules in turn */
|
||||||
Win32_Utilities_fini(void);
|
Win32_Utilities_fini();
|
||||||
// Win32_FileManagement_fini();
|
// Win32_FileManagement_fini();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,12 @@
|
||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||||
*/
|
*/
|
||||||
#include <Foundation/NSString.h>
|
#include <Foundation/NSString.h>
|
||||||
#include <Foundation/NSProcessInfo.h>
|
|
||||||
#include <Foundation/NSException.h>
|
#include <Foundation/NSException.h>
|
||||||
|
#include <Foundation/NSLock.h>
|
||||||
|
#include <Foundation/NSPathUtilities.h>
|
||||||
|
#include <Foundation/NSProcessInfo.h>
|
||||||
|
|
||||||
#include "Win32_Utilities.h"
|
#include "GNUstepBase/Win32_Utilities.h"
|
||||||
|
|
||||||
/* ------------------ */
|
/* ------------------ */
|
||||||
/* Internal Variables */
|
/* Internal Variables */
|
||||||
|
@ -125,8 +127,9 @@ Win32NSStringFromEnvironmentVariable(const char * envVar)
|
||||||
* Locates the users profile directory, roughly equivalent to ~/ on unix
|
* Locates the users profile directory, roughly equivalent to ~/ on unix
|
||||||
*/
|
*/
|
||||||
NSString *
|
NSString *
|
||||||
Win32GetUserProfileDirectory(NSString *userName)
|
Win32GetUserProfileDirectory(NSString *loginName)
|
||||||
{
|
{
|
||||||
|
NSString *s;
|
||||||
if ([loginName isEqual: NSUserName()] == YES)
|
if ([loginName isEqual: NSUserName()] == YES)
|
||||||
{
|
{
|
||||||
[gnustep_global_lock lock];
|
[gnustep_global_lock lock];
|
||||||
|
@ -174,21 +177,23 @@ Win32GetUserProfileDirectory(NSString *userName)
|
||||||
* Locates specified directory on Win32 systems
|
* Locates specified directory on Win32 systems
|
||||||
*/
|
*/
|
||||||
NSString *
|
NSString *
|
||||||
Win32FindDirectory( int DirCSIDL)
|
Win32FindDirectory( DWORD DirCSIDL)
|
||||||
{
|
{
|
||||||
[NSException raise: NSInternalInconsistencyException
|
[NSException raise: NSInternalInconsistencyException
|
||||||
format: @"Not implemented! Can't find directories in Win32."];
|
format: @"Not implemented! Can't find directories in Win32."];
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialises resources required by utilities
|
* Initialises resources required by utilities
|
||||||
*/
|
*/
|
||||||
void Win32_Utilities_init(void)
|
void
|
||||||
|
Win32_Utilities_init(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Initialise the COM sub-system for this application
|
* Initialise the COM sub-system for this application
|
||||||
*/
|
*/
|
||||||
CoCreateInstance();
|
//CoCreateInstance();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look for the libraries we need
|
* Look for the libraries we need
|
||||||
|
@ -200,20 +205,15 @@ void Win32_Utilities_init(void)
|
||||||
*/
|
*/
|
||||||
// IShellMalloc, IShellFree
|
// IShellMalloc, IShellFree
|
||||||
// SHGetFolder
|
// SHGetFolder
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes down and releases resources
|
* Closes down and releases resources
|
||||||
*/
|
*/
|
||||||
void Win32_Utilities_fini(void)
|
void
|
||||||
|
Win32_Utilities_fini(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Release the pointers for Explorer Shell functions
|
* Release the pointers for Explorer Shell functions
|
||||||
*/
|
*/
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // defined(__WIN32)
|
|
||||||
// EOF
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue