Add basic support for highlighting Ngspice/SPICE (http://ngspice.sourceforge.net/)
circuit description files syntax. Two main contexts are defined:
- the default context, where the circuit is described,
- the control script context (between .control and .endc).
The default context highlights dot commands, circuit element instance
names and model types. The control script context highlights supported
functions/commands and known variables. Both contexts highlight comments
and line continuation marks.
Other than two FIXMEs, it is a known issue the first line of the file is
part of the default context, while in most cases it would contain the
file title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4270_cleanup: (33 commits)
Upate po/*.po files.
mc.lib: move xterm alt-shift-arrow definitions to lib/tty/key.c.
mc.lib: [terminal:linux] is same as [terminal:console].
(delete_region, copy_region): rename arguments.
src/editor/editwidget.c: grammar.
mceditor: use MB_LEN_MAX constant.
(string_file_name): use mc_g_string_copy.
(complete_engine, insert_text): don't calculate text length twice.
lib/strutil/strutilutf8.c: use MB_LEN_MAX constant.
Remove get_process_stats() test.
Use g_get_monotonic_time() instead of g_get_real_time().
(learn_key): return NULL if buffer is empty.
(learn_key): use g_get_real_time () to simplify time comparision.
(get_key_code): use g_get_real_time () to simplify time comparision.
(xmouse_get_event): use g_get_real_time () to simplify time comparision.
lib/tty/key.c: use named constants for time intervals.
(file_mask_dialog): indentation.
Reimplement compiler options checking.
lib/util.c: remove unneeded include.
lib/keybind.h: remove unneeded includes.
...
(copy_cmd, copy_cmd_local, rename_cmd, rename_cmd_local, delete_cmd,
delete_cmd_local): move same code to panel_operate(), make inline.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
handle_console_linux() passes the address of action to write() and intends
to send one byte of data (the LSB). On LE this works, but one BE machines
this sends the MSB which is always zero. Fix this by assigning the value
first to a char type, and use that instead.
Thanks Sven Schnelle <svens@stackframe.org> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...on systems that have no /bin/cat (like NixOS).
When opening .diff or .patch files mcview invokes /bin/cat. NixOS has no
/bin/cat (the path to cat looks like /run/current-system/sw/bin/cat).
However cat is still in PATH, so replace /bin/cat with just cat. This
should not affect other systems as /bin should normally be in PATH.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The mc's built-in samba library which is used to access data across
smb links is taken from an old samba version.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 4285_sftp_symlink_timestamps:
(sftpfs_chmod): set permissions only, don't touch other attributes.
Ticket #4285: sftp: timestamps are not preserved for uploaded symlink.
* (sftpfs_symlink): don't call sftpfs_fix_filename() for target file
bacause it breaks symlink: relative symlinks became an absolute one.
* (sftpfs_utime): set timestamps only, don't touch other attributes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>