Skip to content

Commit 276489e

Browse files
committed
Restore imgview branch
1 parent 2068c46 commit 276489e

File tree

623 files changed

+35331
-32900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

623 files changed

+35331
-32900
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
freebsd_test_task:
22
freebsd_instance:
3-
image_family: freebsd-14-0
3+
image_family: freebsd-13-2
44
name: cirrus/FreeBSD
5-
install_script: pkg install -y cmake git pkgconf bash wx32-gtk3 libssh openssl libnfs neon libarchive samba416 pcre uchardet xerces-c3
5+
install_script: pkg install -y cmake git pkgconf bash wx32-gtk3 libssh openssl libnfs neon libarchive samba413 pcre uchardet xerces-c3
66
script: mkdir build && cd build && cmake .. && make -j $(getconf _NPROCESSORS_ONLN) && ./install/far2l --help
77

88
macos_test_task:

.clang-format

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,14 @@ IndentWidth: 4
44
TabWidth: 4
55
Language: Cpp
66
Standard: Latest
7-
SortIncludes: Never
7+
SortIncludes: false
88

99
AccessModifierOffset: -4
1010
AlignAfterOpenBracket: DontAlign
11-
AlignConsecutiveAssignments:
12-
Enabled: false
13-
AlignConsecutiveDeclarations:
14-
Enabled: false
15-
AlignConsecutiveBitFields:
16-
Enabled: true
17-
AcrossEmptyLines: true
18-
AcrossComments: true
19-
AlignConsecutiveMacros:
20-
Enabled: true
21-
AcrossEmptyLines: true
22-
AcrossComments: true
11+
AlignConsecutiveAssignments: false
12+
AlignConsecutiveDeclarations: false
13+
AlignConsecutiveBitFields: true
14+
AlignConsecutiveMacros: true
2315
AllowAllArgumentsOnNextLine: false
2416
AllowShortFunctionsOnASingleLine: Inline
2517
AllowShortLambdasOnASingleLine: Empty
@@ -33,7 +25,7 @@ IndentCaseLabels: true
3325
BreakBeforeBraces: Custom
3426
BraceWrapping:
3527
AfterClass: true
36-
AfterControlStatement: Never
28+
AfterControlStatement: false
3729
AfterEnum: true
3830
AfterFunction: true
3931
AfterNamespace: true

.github/workflows/artifacts.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Artifacts
22

3-
on:
4-
push:
5-
branches:
6-
- master
3+
on: [push]
74

85
env:
96
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
@@ -22,40 +19,45 @@ jobs:
2219
options: "-DPYTHON=yes"
2320

2421
steps:
25-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v2
2623

2724
- name: Dependencies
2825
run: sudo apt-get update ; sudo apt-get -y install $(cat dependencies${{ matrix.dependencies }}.txt)
2926

3027
- name: Create Build Environment
31-
# Create a separate build directory as working directory for all subsequent commands
32-
run: mkdir -p _build
28+
# Some projects don't allow in-source building, so create a separate build directory
29+
# We'll use this as our working directory for all subsequent commands
30+
run: cmake -E make_directory ${{github.workspace}}/build
3331

3432
- name: Configure CMake
3533
# Use a bash shell so we can use the same syntax for environment variable
3634
# access regardless of the host operating system
3735
shell: bash
38-
# -S and -B options specify source and build directories
39-
run: cmake -S . -B _build -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{ matrix.options }}
36+
working-directory: ${{github.workspace}}/build
37+
# Note the current convention is to use the -S and -B options here to specify source
38+
# and build directories, but this is only available with CMake 3.13 and higher.
39+
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
40+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{ matrix.options }}
4041

4142
- name: Build
43+
working-directory: ${{github.workspace}}/build
4244
shell: bash
4345
# Execute the build. You can specify a specific target with "--target <NAME>"
44-
run: |
45-
cmake --build _build --config $BUILD_TYPE
46+
run: cmake --build . --config $BUILD_TYPE
4647

4748
- name: File Tree
49+
working-directory: ${{github.workspace}}/build
4850
shell: bash
49-
run: tree _build
51+
run: tree
5052

5153
- name: Packing Artifact
52-
uses: actions/upload-artifact@v4
54+
uses: actions/upload-artifact@v2
5355
with:
5456
name: far2l-release${{ matrix.dependencies }}
55-
path: _build/install
57+
path: ${{github.workspace}}/build/install
5658

5759
- name: Test
58-
working-directory: _build
60+
working-directory: ${{github.workspace}}/build
5961
shell: bash
6062
# Execute tests defined by the CMake configuration.
6163
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail

CMakeLists.txt

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,10 @@ endif()
4545

4646
if(NOT "${GIT_TAG}" STREQUAL "v_${VERSION}")
4747
if(GIT_FOUND)
48-
if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
49-
execute_process(COMMAND "${GIT_EXECUTABLE}" show --no-patch --format=%ci HEAD
50-
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
51-
OUTPUT_VARIABLE GIT_DATE
52-
OUTPUT_STRIP_TRAILING_WHITESPACE)
53-
string(SUBSTRING ${GIT_DATE} 0 10 GIT_DATE)
54-
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD
55-
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
56-
OUTPUT_VARIABLE GIT_HASH
57-
OUTPUT_STRIP_TRAILING_WHITESPACE)
58-
endif()
59-
endif()
60-
if(NOT "${GIT_DATE}" STREQUAL "")
61-
message(STATUS "git date: ${GIT_DATE}")
62-
set(VERSION_PATCH "${VERSION_PATCH}-${GIT_DATE}")
48+
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD
49+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
50+
OUTPUT_VARIABLE GIT_HASH
51+
OUTPUT_STRIP_TRAILING_WHITESPACE)
6352
endif()
6453
if(NOT "${GIT_HASH}" STREQUAL "")
6554
message(STATUS "git hash: ${GIT_HASH}")
@@ -95,10 +84,6 @@ endif()
9584

9685
##############################
9786

98-
if (NOT DEFINED TESTING)
99-
set(TESTING "NO")
100-
endif()
101-
10287
if (NOT DEFINED USEWX)
10388
set(USEWX "YES")
10489
endif()
@@ -459,7 +444,7 @@ if (DEFINED VIRTUAL_PYTHON)
459444
add_subdirectory (python)
460445
# Copy this explicitly cuz generic copier command excludes 'far2l'
461446
install(DIRECTORY "${INSTALL_DIR}/Plugins/python/plug/far2l"
462-
DESTINATION "lib/far2l/Plugins/python/plug/" USE_SOURCE_PERMISSIONS
447+
DESTINATION "share/far2l/Plugins/python/plug/" USE_SOURCE_PERMISSIONS
463448
COMPONENT base FILES_MATCHING
464449
PATTERN "*")
465450
else()
@@ -473,7 +458,7 @@ else()
473458
execute_process(COMMAND echo Python: preparing virtual environment)
474459
" COMPONENT system)
475460
install(CODE "
476-
execute_process(COMMAND ${Python3_EXECUTABLE} -m venv --system-site-packages ${CMAKE_INSTALL_PREFIX}/lib/far2l/Plugins/python/plug/python)
461+
execute_process(COMMAND ${PYTHON3} -m venv --system-site-packages ${CMAKE_INSTALL_PREFIX}/lib/far2l/Plugins/python/plug/python)
477462
" COMPONENT system)
478463
install(CODE "
479464
execute_process(COMMAND echo Python: installing packages)
@@ -484,7 +469,7 @@ else()
484469

485470
# Copy this explicitly cuz generic copier command excludes 'far2l'
486471
install(DIRECTORY "${INSTALL_DIR}/Plugins/python/plug/far2l"
487-
DESTINATION "lib/far2l/Plugins/python/plug/" USE_SOURCE_PERMISSIONS
472+
DESTINATION "share/far2l/Plugins/python/plug/" USE_SOURCE_PERMISSIONS
488473
COMPONENT base FILES_MATCHING
489474
PATTERN "*")
490475
else()
@@ -540,8 +525,7 @@ install(DIRECTORY "${INSTALL_DIR}/" DESTINATION "lib/far2l" USE_SOURCE_PERMISSIO
540525
PATTERN "far2l_gui.so"
541526
PATTERN "far2l_ttyx.broker"
542527
PATTERN "plug/*.far-plug-*"
543-
PATTERN "plug/*.broker"
544-
)
528+
PATTERN "plug/*.broker")
545529

546530
install(DIRECTORY "${INSTALL_DIR}/" DESTINATION "share/far2l" USE_SOURCE_PERMISSIONS COMPONENT base FILES_MATCHING
547531
PATTERN "${EXECUTABLE_NAME}" EXCLUDE
@@ -550,8 +534,7 @@ install(DIRECTORY "${INSTALL_DIR}/" DESTINATION "share/far2l" USE_SOURCE_PERMISS
550534
PATTERN "*.far-plug-*" EXCLUDE
551535
PATTERN "*.broker" EXCLUDE
552536
PATTERN "python/plug/python" EXCLUDE
553-
PATTERN "*"
554-
)
537+
PATTERN "*")
555538

556539
# setup some symlinks and remove deprecated stuff from previous installation
557540
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../../bin/far2l ${PROJECT_BINARY_DIR}/far2l/far2l_askpass)

FARStdlib/include/all_far.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ struct FPPeriod
180180
/** @defgroup StdLib RTL extension\replacement
181181
@{
182182
183-
Wrappers for stdlib functions and some useful extended stdlib functions.
183+
Wrapers for stdlib functions and some usefull extended stdlib functions.
184184
*/
185185
#if !defined(__FP_NOT_FUNCTIONS__)
186186
// string extension
@@ -266,7 +266,7 @@ extern LPCSTR _cdecl Message(LPCSTR patt, ...);
266266
extern LPCSTR WINAPI MessageV(LPCSTR patt, va_list a);
267267

268268
// Utils
269-
extern LPCSTR WINAPI FCps(char *buff, double val); // Create CPS value string (Always 3+1+3+1 length)
269+
extern LPCSTR WINAPI FCps(char *buff, double val); // Create CPS value string (Allways 3+1+3+1 length)
270270
extern LPSTR WINAPI AddLastSlash(char *path, char Slash = '/');
271271
extern LPSTR WINAPI DelLastSlash(char *path, char Slash = '/');
272272
extern LPCSTR WINAPI FPath(LPCSTR nm, char Slash = '/');

FARStdlib/include/fstdlib.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __FAR_PLUGINS_UTILITIES
2-
#define __FAR_PLUGINS_UTILITIES
1+
#ifndef __FAR_PLUGINS_UTILITES
2+
#define __FAR_PLUGINS_UTILITES
33

44
/** @mainpage FAR Standard Library
55
@author Jouri Mamaev [email protected]
@@ -9,7 +9,7 @@
99
C++ library for easy create plugins for file and archive manager FAR. <br>
1010
Contains set of classes and functions designed to decrease time for write all types of FAR plugins.
1111
12-
Initially created by [email protected]
12+
Initialy created by [email protected]
1313
1414
@section Structure Document structure
1515
This documentation structure:
@@ -20,8 +20,8 @@
2020
- Variables Global variables;
2121
2222
@section Add Additional helpers.
23-
Additional helpers and classes does not relative to FAR API directly but used by other wrappers or
24-
incapsulate useful functionality.
23+
Additional helpers andd classes does not relatie to FAR API directly but used by other wrapers or
24+
incapsulate usefull functionality.
2525
2626
- FP_Screen - helper for save and restore FAR screen buffer. <br>
2727
Class for save and restore whole screen buffer.
@@ -344,7 +344,7 @@ struct FP_Dialog
344344
[fstd_ilist.cpp]
345345
346346
PluginPanelItem Reserved and can be used to store additional data.
347-
This data will be correctly copied and deleted in FP_ItemList.
347+
This data will be correctly copyed and deleted in FP_ItemList.
348348
You MUST use _Alloc or strdup to allocate data space.
349349
Data CAT NOT BE zero sized.
350350
*/

FARStdlib/include/funi.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
typedef char *FKeyBarTitle[12];
5959
typedef FKeyBarTitle *PFKeyBarTitle;
6060

61-
// Hot key for operate with codes got from plugin `ProcessKey` and passed to FPanel `DoProcessKey`
61+
// Hot key for operate with codes getted from plugin `ProcessKey` and passed to FPanel `DoProcessKey`
6262
#define FHK_MAKE(sh, key) MK_DWORD(((WORD)sh), ((WORD)key))
6363
#define FHK_SHIFT(hkey) ((unsigned int)LO_WORD((DWORD)hkey))
6464
#define FHK_KEY(hkey) ((int)HI_WORD((DWORD)hkey))
6565

66-
// Useful console chars
66+
// Usefull console chars
6767
/*
6868
#define FAR_SHADOW_CHAR '\xB0' //°
6969
#define FAR_FULL_CHAR '\xDB' //Û
@@ -146,7 +146,7 @@ extern int WINAPI FP_Color(int far_color_num);
146146

147147
// --------------------------------------------------------------
148148
#if !defined(__FP_NOT_FUNCTIONS__)
149-
extern PluginStartupInfo *FP_Info; ///< Pointer to FAR plugin communication info structure.
149+
extern PluginStartupInfo *FP_Info; ///< Pointer to FAR plugin comunication info structure.
150150
extern FarStandardFunctions *FP_FSF;
151151
extern char *FP_PluginRootKey;
152152
extern BOOL FP_IsOldFar;
@@ -163,7 +163,7 @@ extern LPCSTR WINAPI FP_GetPluginName(void);
163163

164164
/** @defgroup DefDialog Dialog description
165165
@{
166-
Useful tools for define and set arrays of FAR dialog items.
166+
Usefull tools for define and set arrays of FAR dialog items.
167167
*/
168168

169169
#define FFDI_MASK 0xFFUL
@@ -180,7 +180,7 @@ extern int WINAPI FP_Message(unsigned int Flags, LPCSTR HelpTopic, LPCSTR *Items
180180
@{
181181
182182
[fstd_Msg.cpp]
183-
Wrappers for FAR language API.
183+
Wrapers for FAR language API.
184184
*/
185185
#define FMSG(v) ((LPCSTR)(INT_PTR)(v))
186186
#define FISMSG(v) ((v) != NULL && (DWORD_PTR)(v) > FAR_MAX_LANGID)
@@ -205,11 +205,11 @@ inline LPCSTR FP_GetMsg(LPCSTR Msg)
205205
/**@}*/
206206

207207
// --------------------------------------------------------------
208-
/** @defgroup FarRegXX Registry manipulations.
208+
/** @defgroup FarRegXX Regestry manipulations.
209209
@{
210210
211211
[fstd_RegXX.cpp]
212-
Wrappers for regestry Win API.
212+
Wrapers for regestry Win API.
213213
*/
214214
#if !defined(__FP_NOT_FUNCTIONS__)
215215
extern int WINAPI FP_GetRegKey(LPCSTR Key, LPCSTR ValueName, DWORD Default);
@@ -266,11 +266,11 @@ extern void WINAPI FP_PopKey(HANDLE PushedKey);
266266
@{
267267
268268
[fstd_ClpS.cpp]
269-
Wrappers for clipboard Win API.
269+
Wrapers for clipboard Win API.
270270
*/
271271
#if !defined(__FP_NOT_FUNCTIONS__)
272272
extern BOOL WINAPI FP_CopyToClipboard(LPVOID Data, SIZE_T DataSize);
273-
extern BOOL WINAPI FP_GetFromClipboard(LPVOID &Data, SIZE_T &DataSize); // The callees should call `free()` to recvd data
273+
extern BOOL WINAPI FP_GetFromClipboard(LPVOID &Data, SIZE_T &DataSize); // The calles should call `free()` to recvd data
274274
#endif
275275
/**@}*/
276276

FARStdlib/src/fstd_FMsg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int WINAPI FP_Message(unsigned int Flags, LPCSTR HelpTopic, LPCSTR *Items, int I
3030
width = Max(width, strlen(litems[rc]));
3131
}
3232

33-
// Calc if message need to be redrawn with smaller dimensions
33+
// Calc if message need to be redrawn with smaller dimentions
3434
if (!CMsgWidth || (int)width < CMsgWidth || !CMsgHeight || ItemsNumber < CMsgHeight)
3535

3636
// Need restore bk

FARStdlib/src/fstd_FUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SaveConsoleTitle::SaveConsoleTitle(BOOL rest /*= TRUE*/)
88
Usage = rest;
99
NeedToRestore = rest;
1010
GET_TIME(LastChange);
11-
WINPORT(GetConsoleTitle)(NULL, SaveTitle, ARRAYSIZE(SaveTitle));
11+
WINPORT(GetConsoleTitle)(SaveTitle, ARRAYSIZE(SaveTitle));
1212
Log(("TITLE: Save"));
1313
}
1414
SaveConsoleTitle::~SaveConsoleTitle()
@@ -35,7 +35,7 @@ void SaveConsoleTitle::Text(LPCSTR buff)
3535
buff = _buff;
3636
}
3737
*/
38-
WINPORT(SetConsoleTitle)(NULL, MB2Wide(buff).c_str());
38+
WINPORT(SetConsoleTitle)(MB2Wide(buff).c_str());
3939
}
4040

4141
void SaveConsoleTitle::Restore(void) {}

FARStdlib/src/fstd_Msg.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/** @ingroup GetMsg
66
@fn LPCSTR FP_GetMsg( int MsgId )
7-
@brief Retrieve text message by it number.
7+
@brief Retrive text message by it number.
88
99
@param MsgId Index of message in LNG file.
1010
@@ -14,7 +14,7 @@
1414

1515
/** @ingroup GetMsg
1616
@fn LPCSTR FP_GetMsg( LPCSTR Msg )
17-
@brief Retrieve text message by it number.
17+
@brief Retrive text message by it number.
1818
1919
@param Msg Index of message in LNG file. Index can be converted to LPCSTR using FMSG parameter.
2020
You can set this parameter to real local string pointer.
@@ -69,12 +69,12 @@ static LPCSTR WINAPI _FP_GetMsgSTR(LPCSTR String)
6969
}
7070

7171
/** @var FP_GetMsgINT
72-
@brief Callback function for get language message specified by WORD identifier.
72+
@brief Callback function for get language message specified by WORD identifer.
7373
*/
7474
FP_GetMsgINT_t FP_GetMsgINT = _FP_GetMsgINT;
7575

7676
/** @var FP_GetMsgSTR
7777
@ingroup GetMsg
78-
@brief Callback function for get language message specified by LPCSTR identifier.
78+
@brief Callback function for get language message specified by LPCSTR identifer.
7979
*/
8080
FP_GetMsgSTR_t FP_GetMsgSTR = _FP_GetMsgSTR;

0 commit comments

Comments
 (0)