Code Formatting fixes

This commit is contained in:
Hubert Maier 2016-04-29 14:06:02 +03:00
parent d9d5ea40df
commit 3e756da308

View File

@ -39,27 +39,27 @@ int main(int argc, char *argv[]) {
BPTR lock;
APTR oldwin;
// Obtain the lock to the home directory
if(( lock = IDOS->GetProgramDir() )) {
TEXT progpath[2048];
TEXT apppath[1024] = "AppPaths";
// Obtain a lock to the home directory
if ((lock = IDOS->GetProgramDir())) {
TEXT progpath[2048];
TEXT apppath[1024] = "AppPaths";
if( IDOS->DevNameFromLock( lock,
progpath,
sizeof(progpath),
DN_FULLPATH )) {
if (IDOS->DevNameFromLock(lock,
progpath,
sizeof(progpath),
DN_FULLPATH)) {
// Stop any "Insert volume..." type requesters
oldwin = IDOS->SetProcWindow((APTR)-1);
// Stop any "Insert volume..." type requesters.
oldwin = IDOS->SetProcWindow((APTR)-1);
// Finally, set the variable to the path the executable was run from
IDOS->AddPart( apppath, appname, 1024);
IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR );
// Finally, set the variable to the path the executable was run from.
IDOS->AddPart( apppath, appname, 1024);
IDOS->SetVar( apppath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR );
// Turn system requesters back on
IDOS->SetProcWindow( oldwin );
}
// Turn system requesters back on.
IDOS->SetProcWindow( oldwin );
}
}
// Set up a stack cookie to avoid crashes from a stack set too low
static const char *stack_cookie __attribute__((used)) = "$STACK: 600000";