2 FAR manager incremental search plugin, search as you type in editor.
3 Copyright (C) 1999-2019, Stanislav V. Mekhanoshin
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
20 #if !defined(WINPORT_DIRECT)
22 #if !defined(__WATCOMC__) && (defined(__386__) || defined(_WIN32) || defined(__NT__))
23 void memmovel(void *dest
, void *src
, size_t count
)
35 #if !defined(__WATCOMC__) && (defined(__386__) || defined(_WIN32) || defined(__NT__))
36 void zeromem(void *pMem
, size_t nLength
)
49 size_t utoar(unsigned int nNum
, char *sBuff
, size_t nBuffLen
)
50 // returning index to first byte
59 mov byte ptr
[edi
][ecx
], 0 ; terminating null
64 add edx
, 48 ; to ascii
65 mov byte ptr
[edi
][ecx
], dl
77 size_t sstrnlen(const char *sString
, size_t count
)
94 BOOL
WaitInput(BOOL Infinite
)
96 return WaitForSingleObject(hInputHandle
, Infinite
? INFINITE
: 0) == WAIT_OBJECT_0
;
98 #else // WINPORT_DIRECT
99 size_t utoar(unsigned int nNum
, TCHAR
*sBuff
, size_t nBuffLen
)
100 // returning index to first byte
102 apiSnprintf(sBuff
, nBuffLen
, _T("%*ud"), nBuffLen
- 1, nNum
);
103 sBuff
[nBuffLen
- 1] = 0;
105 for (; pos
< nBuffLen
; ++pos
)
106 if (sBuff
[pos
] != _T(' '))
111 size_t lstrnlen(const TCHAR
*str
, size_t count
)
114 for (i
= 0; i
< count
; i
++)
120 BOOL
WaitInput(BOOL Infinite
)
126 WINPORT(PeekConsoleInput
)(NULL
, &rec
, 1, &ReadCount
);
129 } while (Infinite
&& ReadCount
== 0);
131 return ReadCount
!= 0;
133 #endif // WINPORT_DIRECT