-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New GDX release 7.11.4 for GAMS 47.*
- Loading branch information
1 parent
2598d26
commit a4a7d85
Showing
12 changed files
with
151 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "system_p3.h" | ||
|
||
#if defined(_WIN32) | ||
#include <Windows.h> | ||
#else | ||
#include <unistd.h> | ||
#endif | ||
|
||
namespace rtl::system_p3 { | ||
|
||
void getdir(uint8_t d, std::string &s) | ||
{ | ||
#if defined(_WIN32) | ||
char Drive[3], DirBuf[MAX_PATH], SaveBuf[MAX_PATH]; | ||
if (d) { | ||
Drive[0] = 'A' + d - 1; | ||
Drive[1] = ':'; | ||
Drive[2] = '\0'; | ||
GetCurrentDirectoryA(sizeof(SaveBuf), SaveBuf); | ||
SetCurrentDirectoryA(Drive); | ||
} | ||
GetCurrentDirectoryA(sizeof(DirBuf), DirBuf); | ||
if (d) SetCurrentDirectoryA(SaveBuf); | ||
s.assign(DirBuf); | ||
#else | ||
char DirBuf[512]; | ||
if( const char *p { getcwd( DirBuf, sizeof( DirBuf ) ) }; !p ) | ||
{ | ||
// this is unlikely, and not handled well here: exceptions? | ||
s.clear(); | ||
return; | ||
} | ||
s.assign( DirBuf ); | ||
#endif | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include <string> | ||
|
||
namespace rtl::system_p3 { | ||
|
||
void getdir(uint8_t d, std::string &s); | ||
|
||
} |