mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-11 18:32:53 +03:00
* man2hlp.c (handle_command): Handle '.\"TOPICS' comment.
Use it for translated 'Topics:' message. * gindex.pl: Use first line of man2hlp output as translated 'Topics:' message if fourth argument is empty string. * Makefile.am (mc.hlp.ru): Use empty string as gindex.pl's fourth argument.
This commit is contained in:
parent
e212629436
commit
830c9ae976
@ -1,5 +1,13 @@
|
||||
2002-03-20 Andrew V. Samoilov <kai@cmail.ru>
|
||||
|
||||
* man2hlp.c (handle_command): Handle '.\"TOPICS' comment.
|
||||
Use it for translated 'Topics:' message.
|
||||
* gindex.pl: Use first line of man2hlp output as
|
||||
translated 'Topics:' message if fourth argument
|
||||
is empty string.
|
||||
* Makefile.am (mc.hlp.ru): Use empty string as gindex.pl's
|
||||
fourth argument.
|
||||
|
||||
* textconf.c (version): Write to stdout.
|
||||
* main.c (print_mc_usage): Add "stream" parameter to specify
|
||||
file stream.
|
||||
|
@ -75,7 +75,7 @@ $(srcdir)/mc.hlp: $(top_srcdir)/doc/mc.1 $(top_srcdir)/lib/xnc.hlp $(srcdir)/gin
|
||||
|
||||
$(srcdir)/mc.hlp.ru: $(top_srcdir)/doc/ru/mc.1 $(top_srcdir)/doc/ru/xnc.hlp $(srcdir)/gindex.pl man2hlp
|
||||
- perl $(srcdir)/gindex.pl $(top_srcdir)/doc/ru/mc.1 \
|
||||
$(top_srcdir)/doc/ru/xnc.hlp $(srcdir)/mc.hlp.ru 'ňÁÚÄĹĚŮ ĐĎÍĎÝÉ:'
|
||||
$(top_srcdir)/doc/ru/xnc.hlp $(srcdir)/mc.hlp.ru ''
|
||||
|
||||
install-exec-hook:
|
||||
$(MAKE) install_mcview
|
||||
|
@ -26,6 +26,11 @@ open (HELP2, "< $tmpl_file") or die "Cannot open $tmpl_file: $!\n";
|
||||
push @help_file, <HELP2>;
|
||||
close (HELP2);
|
||||
|
||||
if ($Topics eq ''){
|
||||
$Topics = shift (@help_file);
|
||||
chomp ($Topics);
|
||||
}
|
||||
|
||||
foreach $line (@help_file){
|
||||
if ($line =~ /\x04\[(.*)\]/ && $line !~ /\x04\[main\]/){
|
||||
if (length $1) {
|
||||
|
@ -267,6 +267,18 @@ static void handle_command (char *buffer)
|
||||
if (col > 0) newline ();
|
||||
newline ();
|
||||
}
|
||||
else if (strcmp (buffer, ".\\\"TOPICS") == 0){
|
||||
if (out_row > 1){
|
||||
print_error ("Syntax error: .\\\"TOPICS must be first command");
|
||||
return;
|
||||
}
|
||||
buffer = strtok (NULL, "");
|
||||
if (buffer == NULL){
|
||||
print_error ("Syntax error: .\\\"TOPICS: no text");
|
||||
return;
|
||||
}
|
||||
printf ("%s\n", buffer);
|
||||
}
|
||||
else {
|
||||
/* Other commands are ignored */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user