Release 960611
[wine] / win32 / environment.c
1 /*
2  * Win32 kernel functions
3  *
4  * Copyright 1995 Martin von Loewis and Cameron Heide
5  */
6
7 #include <stdio.h>
8 #include <string.h>
9 #include <unistd.h>
10 #include "windows.h"
11 #include "winerror.h"
12 #include "kernel32.h"
13 #include "module.h"
14 #include "task.h"
15 #include "stddebug.h"
16 #include "debug.h"
17
18
19 /***********************************************************************
20  *           GetCommandLineA      (KERNEL32.161)
21  */
22 LPSTR GetCommandLineA(void)
23 {
24     static char buffer[256];
25     char *cp;
26     PDB *pdb = (PDB *)GlobalLock16( GetCurrentPDB() );
27
28 #ifndef WINELIB
29     strcpy(buffer, MODULE_GetModuleName( GetExePtr(GetCurrentTask()) ) );
30     cp = buffer+strlen(buffer);
31     *cp++ = ' ';
32 #else
33     cp = buffer;
34 #endif;
35     memcpy( cp, &pdb->cmdLine[1], pdb->cmdLine[0] );
36     dprintf_win32(stddeb,"CommandLine = %s\n", buffer );
37     return buffer;
38 }
39
40
41 /***********************************************************************
42  *           GetSystemPowerStatus      (KERNEL32.621)
43  */
44 BOOL GetSystemPowerStatus(LPSYSTEM_POWER_STATUS sps_ptr)
45 {
46     return FALSE;   /* no power management support */
47 }
48
49
50 /***********************************************************************
51  *           SetSystemPowerState      (KERNEL32.630)
52  */
53 BOOL SetSystemPowerState(BOOL suspend_or_hibernate, BOOL force_flag)
54 {
55     /* suspend_or_hibernate flag: w95 does not support
56        this feature anyway */
57
58     for ( ;0; )
59     {
60         if ( force_flag )
61         {
62         }
63         else
64         {
65         }
66     }
67     return TRUE;
68 }
69