Index: trunk/src/kernel32/atom.cpp
===================================================================
--- trunk/src/kernel32/atom.cpp	(revision 3511)
+++ trunk/src/kernel32/atom.cpp	(revision 3512)
@@ -1,3 +1,3 @@
-/* $Id: atom.cpp,v 1.7 2000-02-16 14:25:30 sandervl Exp $ */
+/* $Id: atom.cpp,v 1.8 2000-05-10 13:13:31 sandervl Exp $ */
 
 /*
@@ -12,4 +12,5 @@
 #include <os2win.h>
 #include "unicode.h"
+#include <heapstring.h>
 
 #define DBG_LOCALLOG	DBG_atom
@@ -20,5 +21,5 @@
 ATOM WIN32API FindAtomA( LPCSTR arg1)
 {
-    dprintf(("KERNEL32:  OS2FindAtomA\n"));
+    dprintf(("KERNEL32:  FindAtomA\n"));
     return O32_FindAtom(arg1);
 }
@@ -30,5 +31,5 @@
  char *astring;
 
-    dprintf(("KERNEL32:  OS2FindAtomW"));
+    dprintf(("KERNEL32:  FindAtomW"));
     if (arg1 < (LPCWSTR)0x10000)
         rc = O32_FindAtom((char*)arg1);
@@ -45,6 +46,12 @@
 ATOM WIN32API AddAtomA(LPCSTR arg1)
 {
-    dprintf(("KERNEL32:  OS2AddAtomA\n"));
-    return O32_AddAtom(arg1);
+ ATOM atom;
+
+    atom = O32_AddAtom(arg1);
+    if(HIWORD(arg1)) {
+    	 dprintf(("KERNEL32: AddAtomA %s returned %x", arg1, atom));
+    }
+    else dprintf(("KERNEL32: AddAtomA %x returned %x", arg1, atom));
+    return atom;
 }
 //******************************************************************************
@@ -55,11 +62,11 @@
  char *astring;
 
-    dprintf(("KERNEL32:  OS2AddAtomW\n"));
-    if (arg1 < (LPCWSTR)0x10000)
-        rc = O32_AddAtom((char*)arg1);
-    else
-    {
-        astring = UnicodeToAsciiString((LPWSTR)arg1);
-        rc = O32_AddAtom(astring);
+    if(HIWORD(arg1) == 0) {
+        rc = AddAtomA((char*)arg1);
+    }
+    else
+    {
+        astring = UnicodeToAsciiString((LPWSTR)arg1);
+        rc = AddAtomA(astring);
         FreeAsciiString(astring);
     }
@@ -71,5 +78,5 @@
 UINT WIN32API GetAtomNameA( ATOM arg1, LPSTR arg2, int  arg3)
 {
-    dprintf(("KERNEL32:  OS2GetAtomNameA\n"));
+    dprintf(("KERNEL32:  GetAtomNameA\n"));
     return O32_GetAtomName(arg1, arg2, arg3);
 }
@@ -82,5 +89,5 @@
  char *astring;
 
-    dprintf(("KERNEL32:  OS2GetAtomNameW\n"));
+    dprintf(("KERNEL32:  GetAtomNameW\n"));
     astring = UnicodeToAsciiString(arg2); /* FIXME! */
     rc = O32_GetAtomName(arg1, astring, arg3);
@@ -92,5 +99,5 @@
 ATOM WIN32API DeleteAtom( ATOM arg1)
 {
-    dprintf(("KERNEL32:  OS2DeleteAtom\n"));
+    dprintf(("KERNEL32:  DeleteAtom\n"));
     return O32_DeleteAtom(arg1);
 }
@@ -99,5 +106,5 @@
 ATOM WIN32API GlobalDeleteAtom( ATOM arg1)
 {
-    dprintf(("KERNEL32:  OS2GlobalDeleteAtom\n"));
+    dprintf(("KERNEL32:  GlobalDeleteAtom\n"));
     return O32_GlobalDeleteAtom(arg1);
 }
@@ -106,5 +113,5 @@
 BOOL WIN32API InitAtomTable( DWORD arg1)
 {
-    dprintf(("KERNEL32:  OS2InitAtomTable\n"));
+    dprintf(("KERNEL32:  InitAtomTable\n"));
     return O32_InitAtomTable(arg1);
 }
@@ -113,6 +120,12 @@
 ATOM WIN32API GlobalAddAtomA(LPCSTR arg1)
 {
-    dprintf(("KERNEL32:  OS2GlobalAddAtomA %s\n", arg1));
-    return O32_GlobalAddAtom(arg1);
+ ATOM atom;
+
+    atom = O32_GlobalAddAtom(arg1);
+    if(HIWORD(arg1)) {
+    	 dprintf(("KERNEL32: GlobalAddAtomA %s returned %x", arg1, atom));
+    }
+    else dprintf(("KERNEL32: GlobalAddAtomA %x returned %x", arg1, atom));
+    return atom;
 }
 //******************************************************************************
@@ -123,14 +136,12 @@
  ATOM  rc;
 
-    if (arg1 < (LPCWSTR)0x10000)
-    {
-        dprintf(("KERNEL32:  OS2GlobalAddAtomW %#4x\n", astring));
-        rc = O32_GlobalAddAtom((char*)arg1);
-    }
-    else
-    {
-        astring = UnicodeToAsciiString((LPWSTR)arg1);
-        dprintf(("KERNEL32:  OS2GlobalAddAtomW %s\n", astring));
-        rc = O32_GlobalAddAtom(astring);
+    if(HIWORD(arg1) == 0)
+    {
+        rc = GlobalAddAtomA((char*)arg1);
+    }
+    else
+    {
+        astring = UnicodeToAsciiString((LPWSTR)arg1);
+        rc = GlobalAddAtomA(astring);
         FreeAsciiString(astring);
     }
@@ -154,33 +165,42 @@
  ATOM  rc;
 
-    dprintf(("KERNEL32:  OS2GlobalFindAtomW\n"));
-    if (arg1 < (LPCWSTR)0x10000)
-        rc = O32_GlobalFindAtom((char*)arg1);
-    else
-    {
-        astring = UnicodeToAsciiString((LPWSTR)arg1);
-        rc = O32_GlobalFindAtom(astring);
-        FreeAsciiString(astring);
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-UINT WIN32API GlobalGetAtomNameA( ATOM arg1, LPSTR arg2, int  arg3)
-{
-    dprintf(("KERNEL32:  OS2GlobalGetAtomNameA\n"));
-    return O32_GlobalGetAtomName(arg1, arg2, arg3);
-}
-//******************************************************************************
-//******************************************************************************
-UINT WIN32API GlobalGetAtomNameW( ATOM arg1, LPWSTR arg2, int  arg3)
-{
- char *astring;
- ATOM  rc;
-
-    dprintf(("KERNEL32:  OS2GlobalGetAtomNameW\n"));
-    astring = UnicodeToAsciiString((LPWSTR)arg1); /* FIXME! */
-    rc = O32_GlobalGetAtomName(arg1, astring, arg3);
-    FreeAsciiString(astring);
-    return(rc);
-}
+    if(HIWORD(arg1) == 0)
+        rc = GlobalFindAtomA((char*)arg1);
+    else
+    {
+        astring = UnicodeToAsciiString((LPWSTR)arg1);
+        rc = GlobalFindAtomA(astring);
+        FreeAsciiString(astring);
+    }
+    return(rc);
+}
+//******************************************************************************
+//******************************************************************************
+UINT WIN32API GlobalGetAtomNameA(ATOM atom, LPSTR lpszBuffer, int cchBuffer)
+{
+    dprintf(("KERNEL32: GlobalGetAtomNameA %x %x %d", atom, lpszBuffer, cchBuffer));
+    return O32_GlobalGetAtomName(atom, lpszBuffer, cchBuffer);
+}
+//******************************************************************************
+//******************************************************************************
+UINT WIN32API GlobalGetAtomNameW(ATOM atom, LPWSTR lpszBuffer, int cchBuffer)
+{
+ char *astring;
+ UINT rc;
+
+    dprintf(("KERNEL32: GlobalGetAtomNameW %x %x %d", atom, lpszBuffer, cchBuffer));
+    astring = (char *)alloca(cchBuffer);
+    if(astring == NULL) {
+	dprintf(("GlobalGetAtomNameW: alloca failed!!"));
+	DebugInt3();
+	return 0;
+    }
+    rc = GlobalGetAtomNameA(atom, astring, cchBuffer);
+    if(rc) {
+    	 lstrcpyAtoW(lpszBuffer, astring);
+    }
+    else lpszBuffer[0] = 0; //necessary?
+    return rc;
+}
+//******************************************************************************
+//******************************************************************************
Index: trunk/src/kernel32/environ.cpp
===================================================================
--- trunk/src/kernel32/environ.cpp	(revision 3511)
+++ trunk/src/kernel32/environ.cpp	(revision 3512)
@@ -1,3 +1,3 @@
-/* $Id: environ.cpp,v 1.3 2000-05-09 18:56:08 sandervl Exp $ */
+/* $Id: environ.cpp,v 1.4 2000-05-10 13:13:32 sandervl Exp $ */
 
 /*
@@ -142,14 +142,4 @@
 static LPCSTR ENV_FindVariable( LPCSTR env, LPCSTR name, INT len )
 {
-//temporary hack for MS Office 2000 install
-#if 1
-    char tempvar[] = "tmp";
-
-    if(len == 4 && !lstrncmpiA(name, "TEMP", 4)) {
-	name = tempvar;
-	len = 3;
-    }
-#endif
-
     while (*env)
     {
