Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
21a21e91
Commit
21a21e91
authored
Jan 17, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added routines to detect program location and cwd
parent
d8786b8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
src/plugins/kumiranalizer/stdlibmodules.h
src/plugins/kumiranalizer/stdlibmodules.h
+6
-2
src/shared/stdlib/kumirstdlib.hpp
src/shared/stdlib/kumirstdlib.hpp
+23
-0
No files found.
src/plugins/kumiranalizer/stdlibmodules.h
View file @
21a21e91
...
...
@@ -105,8 +105,12 @@ class Files
/* 0x000f */
result
<<
QString
::
fromUtf8
(
"алг НАЗНАЧИТЬ ВВОД(лит имя файла)"
);
/* 0x0010 */
result
<<
QString
::
fromUtf8
(
"алг НАЗНАЧИТЬ ВЫВОД(лит имя файла)"
);
/* 0x0011*/
result
<<
QString
::
fromUtf8
(
"алг лог =(файл ф1, файл ф2)"
);
/* 0x0012*/
result
<<
QString
::
fromUtf8
(
"алг лог <>(файл ф1, файл ф2)"
);
/* 0x0011 */
result
<<
QString
::
fromUtf8
(
"алг лит РАБОЧИЙ КАТАЛОГ"
);
/* 0x0012 */
result
<<
QString
::
fromUtf8
(
"алг лит КАТАЛОГ ПРОГРАММЫ"
);
/* 0x0013*/
result
<<
QString
::
fromUtf8
(
"алг лог =(файл ф1, файл ф2)"
);
/* 0x0014*/
result
<<
QString
::
fromUtf8
(
"алг лог <>(файл ф1, файл ф2)"
);
return
result
;
}
...
...
src/shared/stdlib/kumirstdlib.hpp
View file @
21a21e91
...
...
@@ -1194,6 +1194,13 @@ public:
absPath
=
workDir
+
fileName
;
return
getNormalizedPath
(
absPath
,
Char
(
'\\'
));
}
inline
static
String
CurrentWorkingDirectory
()
{
wchar_t
cwd
[
1024
];
GetCurrentDirectoryW
(
1024
,
cwd
);
String
workDir
;
workDir
=
String
(
cwd
);
return
workDir
;
}
#else
inline
static
String
getAbsolutePath
(
const
String
&
fileName
)
{
char
cwd
[
1024
];
...
...
@@ -1215,6 +1222,22 @@ public:
absPath
=
workDir
+
fileName
;
return
getNormalizedPath
(
absPath
,
Char
(
'/'
));
}
inline
static
String
CurrentWorkingDirectory
()
{
char
cwd
[
1024
];
getcwd
(
cwd
,
1024
*
sizeof
(
char
));
String
workDir
;
# ifdef NO_UNICODE
workDir
=
String
(
cwd
);
# else
wchar_t
wcwd
[
1024
];
size_t
pl
=
mbstowcs
(
wcwd
,
cwd
,
1024
);
wcwd
[
pl
]
=
L'\0'
;
workDir
=
String
(
wcwd
);
# endif
return
workDir
;
}
#endif
inline
static
String
getNormalizedPath
(
const
String
&
path
,
const
Char
separator
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment