File: msg.c

package info (click to toggle)
udo 6.4.1-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,328 kB
  • ctags: 2,994
  • sloc: ansic: 42,689; makefile: 70; cpp: 19
file content (871 lines) | stat: -rw-r--r-- 20,162 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
/*	######################################################################
	# @(#) msg.c
	# @(#)
	# @(#) Copyright (c) 1995-2001 by Dirk Hagedorn
	# @(#) Dirk Hagedorn (udo@dirk-hagedorn.de)
	#
	# This program is free software; you can redistribute it and/or
	# modify it under the terms of the GNU General Public License
	# as published by the Free Software Foundation; either version 2
	# of the License, or (at your option) any later version.
	# 
	# This program is distributed in the hope that it will be useful,
	# but WITHOUT ANY WARRANTY; without even the implied warranty of
	# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	# GNU General Public License for more details.
	# 
	# You should have received a copy of the GNU General Public License
	# along with this program; if not, write to the Free Software
	# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
	######################################################################	*/

#ifndef ID_MSG_C
#define ID_MSG_C
const char *id_msg_c= "@(#) msg.c       01.01.1999";
#endif

#include "import.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <errno.h>
#include "portab.h"
#include "constant.h"
#include "version.h"
#include "udo_type.h"
#include "udo.h"
#include "toc.h"
#include "gui.h"

#include "export.h"
#include "msg.h"


/*	######################################################################
	# lokale Variablen
	######################################################################	*/
LOCAL int error_counter;
LOCAL int warning_counter;
LOCAL int note_counter;


/*	######################################################################
	# lokale Prototypen
	######################################################################	*/
LOCAL void loglnpos ( const char *we, const char *msg );
LOCAL void warnlnpos ( const char *msg );
LOCAL void errlnpos ( const char *msg );
LOCAL void fatallnpos ( const char *msg );

LOCAL void error_msg_solo ( const char *em );
LOCAL void error_msg_para ( const char *f, const char *s );
LOCAL void error_msg_para2 ( const char *f, const char *s1, const char *s2 );

LOCAL char * my_strerror ( char *s );
LOCAL void errno_logln ( const char *s );

LOCAL void warning_msg_solo ( const char *em );
LOCAL void warning_msg_para ( const char *f, const char *s );

LOCAL void note_msg_solo ( const char *em );
LOCAL void note_msg_para ( const char *f, const char *s );

LOCAL void fatal_msg_solo ( const char *s );
LOCAL void fatal_msg_para ( const char *f, const char *s );


/*	######################################################################
	# Ausgabe von Strings in die passenden Dateien
	######################################################################	*/
/*	----------------------------------------------------------------------
	Ausgabe einer Zeile ins Logfile inkl. Zeilenvorschub
	----------------------------------------------------------------------	*/
GLOBAL void logln ( const char *s )
{
	if (bBeQuiet && bNoLogfile)
	{	return;
	}
	if (bNoLogfile && no_stderr_output)
	{	return;
	}
	fprintf(fLogfile, "%s\n", s);
}	/* logln */

/*	----------------------------------------------------------------------
	Ausgabe ins Logfile und via printf inklusive Datei und Zeilennummer
	[vj] v6.3.7 hinzugefgt zu debuggingzwecken
	----------------------------------------------------------------------	*/
GLOBAL void loglnposprintf ( const char *we, const char *msg )
{
	char z[512];
	
	sprintf(z, "%s: %s %u: %s",
		we,
		sCurrFileName,
		uiCurrFileLine,
		msg
	);
	logln(z);

#ifdef USE_LOGLNPOSPRINTF
	printf("%s\n", z);
#else
	show_logln_message(z);	/* r6pl12: Ausgabe ans GUI weiterreichen */
#endif
	
}	/* loglnpos */

/*	----------------------------------------------------------------------
	Ausgabe ins Logfile inklusive Datei und Zeilennummer
	----------------------------------------------------------------------	*/
LOCAL void loglnpos ( const char *we, const char *msg )
{
	char z[512];
	
	sprintf(z, "%s: %s %u: %s",
		we,
		sCurrFileName,
		uiCurrFileLine,
		msg
	);
	logln(z);

	show_logln_message(z);	/* r6pl12: Ausgabe ans GUI weiterreichen */
	
}	/* loglnpos */


LOCAL void warnlnpos ( const char *msg )
{
	if (!bNoWarnings)
	{	loglnpos("Warning", msg);
	}
}	/* warnlnpos */

LOCAL void errlnpos ( const char *msg )
{
	loglnpos("Error", msg);
}	/* errlnpos */


LOCAL void fatallnpos ( const char *msg )
{
	loglnpos("Fatal Error", msg);
}	/* fatallnpos */

LOCAL void notelnpos ( const char *msg )
{
	if (!bNoWarnings)
	{	loglnpos("Note", msg);
	}
}	/* notelnpos */


/*	----------------------------------------------------------------------
	Ausgabe einer Zeile ins Logfile inkl. Zeilenvorschub mit Variablen
	----------------------------------------------------------------------	*/
GLOBAL void vloglnf ( const char *fmt, ... )
{
	va_list ap;
	char s[1024];

	s[0]= EOS;
	va_start(ap, fmt);
	vsprintf(s, fmt, ap);
	va_end(ap);
	logln(s);
		
}	/* vloglnf */



/*	######################################################################
	# lokale Funktionen
	######################################################################	*/
LOCAL void error_msg_solo ( const char *em )
{
	errlnpos(em);
	error_counter++;
}

LOCAL void error_msg_para ( const char *f, const char *s )
{
	char m[512];

	sprintf(m, f, s);
	errlnpos(m);
	error_counter++;
}

LOCAL void error_msg_para2 ( const char *f, const char *s1, const char *s2 )
{
	char m[512];

	sprintf(m, f, s1, s2);
	errlnpos(m);
	error_counter++;
}

GLOBAL void error_message ( const char *msg )
{
	char s[512];

	sprintf(s, "Error: %s", msg);
	logln(s);
	error_counter++;
}

/* Fehlermeldung abhaengig von errno ausgeben, zumeist nach */
/* fehlgeschlagenem Oeffnen von Dateien. 					*/

/* Falls der Compiler strerror nicht anbietet, dann		*/
/* in version.h #define HAVE_STRERROR 0 setzen!			*/

/* Falls der Compiler sys_errlist nicht anbietet, dann		*/
/* in version.h #define HAVE_SYS_ERRLIST 0 setzen!			*/

LOCAL char * my_strerror ( char *s )
{
#if HAVE_STRERROR
	strcpy(s, strerror(errno));
#elif HAVE_SYS_ERRLIST
	strcpy(s, sys_errlist[errno]);
#else
	sprintf(s, "Error #%d", errno);
#endif

	return s;
}	/* my_strerror */


LOCAL void errno_logln ( const char *s )
{
	char p[512];

	my_strerror(p);
	
	if (s[0]!=EOS)
	{	vloglnf("%s: %s", s, p);
	}
	else
	{	vloglnf("%s", p);
	}

}	/* errno_logln */


LOCAL void warning_msg_solo ( const char *em )
{
	warnlnpos(em);
	warning_counter++;
}

LOCAL void warning_msg_para ( const char *f, const char *s )
{
	char m[512];

	sprintf(m, f, s);
	warnlnpos(m);
	warning_counter++;
}


GLOBAL void warning_message ( const char *msg )
{
	char s[512];

	sprintf(s, "Warning: %s", msg);
	logln(s);
	warning_counter++;
}

LOCAL void note_msg_solo ( const char *em )
{
	notelnpos(em);
	note_counter++;
}

LOCAL void note_msg_para ( const char *f, const char *s )
{
	char m[512];

	sprintf(m, f, s);
	notelnpos(m);
	note_counter++;
}

GLOBAL void note_message ( const char *msg )
{
	char s[512];

	sprintf(s, "Note: %s", msg);
	logln(s);
	note_counter++;
}

LOCAL void fatal_msg_solo ( const char *s )
{
	fatallnpos(s);
	error_counter++;
	bFatalErrorDetected= TRUE;
}

LOCAL void fatal_msg_para ( const char *f, const char *s )
{
	char m[512];

	sprintf(m, f, s);
	fatallnpos(m);
	error_counter++;
	bFatalErrorDetected= TRUE;
}

GLOBAL void fatal_message ( const char *msg )
{
	char s[512];

	sprintf(s, "Fatal Error: %s", msg);
	logln(s);
	error_counter++;
	bFatalErrorDetected= TRUE;
}	/* fatal_message */


/*	######################################################################
	# Informationen, die ins Logfile geschrieben werden
	######################################################################	*/
GLOBAL void logln_warnings_errors ( void )
{	logln("######## errors, warnings and notes:");
	logln("");
}

GLOBAL void logln_information ( void )
{
	logln("");
	logln("######## information:");
	logln("");
}

GLOBAL void logln_interrupted ( void )
{
	logln("interruption");
}

GLOBAL void logln_file_generated ( const char *kind, const char *filename, const char *suff )
{
	char m[512];

	sprintf(m, "%s written to %s%s", kind, filename, suff);
	logln(m);
}


/*	######################################################################
	# Programm-Fehlermeldungen
	######################################################################	*/
GLOBAL void error_open_logfile ( const char *s )
{	error_msg_para("couldn't open logfile <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_hypfile ( const char *s )
{	error_msg_para("couldn't open hypfile <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_idxfile ( const char *s )
{	error_msg_para("couldn't open index file <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_treefile ( const char *s )
{	error_msg_para("couldn't open treefile <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_uprfile ( const char *s )
{	error_msg_para("couldn't open project file <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_outfile ( const char *s )
{	error_msg_para("couldn't open destination file <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_infile ( const char *s )
{	error_msg_para("couldn't open source file <%s>", s);
	errno_logln(s);
}

GLOBAL void error_infile_outfile ( const char *s )
{	error_msg_para("source and destination file are equal: <%s>", s);
}

GLOBAL void error_write_img ( const char *s )
{	error_msg_para("couldn't write IMG header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_read_img ( const char *s )
{	error_msg_para("couldn't read IMG header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_read_bmp ( const char *s )
{	/* Fixed bug #0000017 in V6.4.1 [NHz] */
	if(strcmp(s, BMP_MW_NAME) == 0)
		note_msg_solo("Image for UDO link generated (see below), please translate again to complete");
	else
	{
		error_msg_para("couldn't read BMP header of <%s>", s);
		errno_logln(s);
	}
}

GLOBAL void error_read_pcx ( const char *s )
{	error_msg_para("couldn't read PCX header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_read_msp ( const char *s )
{	error_msg_para("couldn't read MSP header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_read_gif ( const char *s )
{	error_msg_para("couldn't read GIF header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_read_png ( const char *s )
{	error_msg_para("couldn't read PNG header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_read_jpeg ( const char *s )
{	error_msg_para("couldn't read JPEG header of <%s>", s);
	errno_logln(s);
}

GLOBAL void error_open_pass1 ( const char *s )
{
	char e[512];
	
	my_strerror(e);
	error_msg_para2("couldn't open <%s>: %s", s, e);
}

GLOBAL void error_open_pass2 ( const char *s )
{
	char e[512];
	
	my_strerror(e);
	error_msg_para2("couldn't open <%s>: %s", s, e);
}

GLOBAL void error_mkdir ( const char *s )
{
	char e[512];
	
	my_strerror(e);
	error_msg_para2("couldn't make directory <%s>: %s", s, e);
}


GLOBAL void error_malloc_failed ( void )
{	error_msg_solo("memory allocation failed");
}

GLOBAL void error_buffer_overflow ( void )
{	error_msg_solo("string buffer overflow");
}

GLOBAL void error_missing_title_data ( void )
{	error_msg_solo("no title data available");
}

GLOBAL void error_empty_docinfo ( void )
{	error_msg_solo("empty !docinfo");
}

GLOBAL void error_unknown_docinfo ( const char *s )
{	error_msg_para("unknown docinfo: %s", s);
}

GLOBAL void error_unknown_color ( const char *s )
{	error_msg_para("unknown color: %s", s);
}

GLOBAL void error_error ( const char *s )	/*r6pl4*/
{	error_msg_solo(s);
}


/*	######################################################################
	# grobe Syntaxfehler
	######################################################################	*/
GLOBAL void error_syntax_error ( void )
{	error_msg_solo("syntax error");
}

GLOBAL void error_end_without_begin ( const char *se, const char *sb )
{
	char m[512];
	sprintf(m, "'%s' without '%s'", se, sb);
	errlnpos(m);
	error_counter++;
}

GLOBAL void error_wrong_end ( const char *sb, const char *se )
{
	char m[512];
	sprintf(m, "'%s' followed by '%s'", sb, se);
	errlnpos(m);
	error_counter++;
}

GLOBAL void error_item_outside_env ( void )
{	error_msg_solo("'!item' outside environment");
}

GLOBAL void error_item_many_enum ( void )
{	error_msg_solo("too many items inside enumeration");
}

GLOBAL void error_missing_end ( const char *s )
{	error_msg_para("'%s' expected", s);
}

GLOBAL void error_called_twice ( const char *s )
{	error_msg_para("'%s' called twice", s);
}

GLOBAL void error_too_many_env ( void )
{	error_msg_solo("too many environments used");
}

GLOBAL void error_not_active ( const char *s )
{	error_msg_para("%s not active", s);
}

GLOBAL void error_still_active ( const char *s )
{	error_msg_para("%s still active", s);
}

GLOBAL void error_missing_parameter ( const char *s )
{	error_msg_para("missing parameter(s) at %s", s);
}

GLOBAL void error_too_many_parameters ( void )
{	error_msg_solo("too many parameters used");
}

GLOBAL void error_wrong_nr_parameters ( const char *s )
{	error_msg_para("wrong number of parameters: %s", s);
}

GLOBAL void error_outside_preamble ( const char *s )
{	error_msg_para("%s ignored outside preamble", s);
}

GLOBAL void error_inside_preamble ( const char *s )
{	error_msg_para("%s ignored inside preamble", s);
}

GLOBAL void error_unknown_command ( const char *s )
{	error_msg_para("unknown command: %s", s);
}

GLOBAL void error_unexpected_eol ( void )
{	error_msg_solo("unexpected end of line in command");
}

GLOBAL void error_too_many_macros ( void )
{	error_msg_solo("too many macros used");
}

GLOBAL void error_long_macro_name ( int len )
{
	char s[32];
	sprintf(s, "%d", len);
	error_msg_para("macro name longer than %s characters", s);
}

GLOBAL void error_long_macro_cont ( int len )
{
	char s[32];
	sprintf(s, "%d", len);
	error_msg_para("macro contents longer than %s characters", s);
}

GLOBAL void error_too_many_defines ( void )
{	error_msg_solo("too many definitions used");
}

GLOBAL void error_long_define_name ( int len )
{
	char s[32];
	sprintf(s, "%d", len);
	error_msg_para("definition name longer than %s characters", s);
}

GLOBAL void error_long_define_cont ( int len )
{
	char s[32];
	sprintf(s, "%d", len);
	error_msg_para("definition contents longer than %s characters", s);
}

GLOBAL void error_too_many_symbols ( void )
{	error_msg_solo("too many symbols used");
}

GLOBAL void error_unset_symbol ( const char *s )
{	error_msg_para("symbol %s not set", s);
}

GLOBAL void error_too_many_hyphens ( void )
{	error_msg_solo("too many hyphens used");
}

GLOBAL void error_too_many_tokens ( void )
{	error_msg_solo("too many words used inside paragraph");
}

GLOBAL void error_too_many_node ( void )
{	error_msg_solo("too many nodes used");
}

GLOBAL void error_too_many_label ( void )
{	error_msg_solo("too many labels used");
}

GLOBAL void error_too_many_alias ( void )
{	error_msg_solo("too many aliases used");
}

GLOBAL void error_too_many_files ( void )
{	error_msg_solo("too many files opened");
}

GLOBAL void error_replace_param ( const char *s )
{	error_msg_para("couldn't replace (%s ...)", s);
}

GLOBAL void error_undefined_link ( const char *l )
{	
	if (bInsideDocument)
	{	error_msg_para("link destination undefined: %s", l);
	}
}

GLOBAL void error_else_without_if ( void )
{	error_msg_solo("!else without !if...");
}

GLOBAL void error_endif_without_if ( void )
{	error_msg_solo("!endif without !if...");
}

GLOBAL void error_missing_endif ( const char *s, const UINT l )
{	char m[512];
	error_msg_solo("'!endif' expected");
	sprintf(m, "last '!if': <%s> line %d", s, l);
	error_msg_solo(m);
}


GLOBAL void error_table_width ( void )
{	error_msg_solo("too many columns used");
}

GLOBAL void error_table_height ( void )
{	error_msg_solo("too many rows used");
}

GLOBAL void error_table_cell_width ( void )
{	error_msg_solo("table cell contains too many characters");
}

GLOBAL void error_odd_dblquotes ( void )
{	error_msg_solo("odd number of \"\"");
}

GLOBAL void error_odd_quotes ( void )
{	error_msg_solo("odd number of ''");
}

GLOBAL void error_no_language ( const char *s )
{	error_msg_para ("language %s not supported", s);
}

GLOBAL void error_no_charset ( const char *s )
{	error_msg_para ("charset %s not supported", s);
}

GLOBAL void error_xlink_win_syntax ( void )
{	error_msg_solo("use (!xlink [text] [topic@foo.hlp])");
}

GLOBAL void error_xlink_win_topic ( void )
{	error_msg_solo("xlink needs WinHelp destination topic");
}

GLOBAL void error_xlink_win_file ( void )
{	error_msg_solo("xlinks needs WinHelp destination file");
}

GLOBAL void error_no_udoinputpath ( void )
{	error_msg_solo("$UDOINPUTPATH not set!");
}

GLOBAL void error_fatal_error ( const char *s )
{	fatal_msg_para("%s", s);
}

GLOBAL void error_table_inside_table ( void )
{	error_msg_solo("UDO cannot handle nested tables");
}

GLOBAL void error_wrong_mapping ( void )
{	error_msg_solo("mapping not numeric or not of type integer");
}

GLOBAL void error_node2_not_allowed ( void )
{	fatal_msg_solo("use !node first (structure gap)");
}

GLOBAL void error_node3_not_allowed ( void )
{	fatal_msg_solo("use !subnode first(structure gap)");
}

GLOBAL void error_node4_not_allowed ( void )
{	fatal_msg_solo("use !subsubnode first (structure gap)");
}

/*	######################################################################
	# Warnmeldungen (leichte Syntaxfehler)
	######################################################################	*/

GLOBAL void note_long_sourceline ( void )
{	note_msg_solo("check this paragraph");
}

GLOBAL void warning_long_destline ( const char *s,
	const unsigned int lnr,
	const int ll)
{
	char m[512];

	if (!bNoWarnings)
	{	sprintf(m, "Warning: %s %u: overfull line: %d", s, lnr, ll);
		logln(m);
	}
	warning_counter++;
}


GLOBAL void note_short_sourceline ( const char *s )
{	note_msg_para("check this paragraph", s);
}

GLOBAL void warning_short_destline ( const char *s,
	const unsigned int lnr,
	const int ll,
	const char *w)
{
	char m[512];

	if (!bNoWarnings)
	{	sprintf(m, "Warning: %s %u: underfull line: %d: %s", s, lnr, ll, w);
		logln(m);
	}
	warning_counter++;
}

GLOBAL void warning_no_unichar ( const char *s )
{
	warning_msg_para("%s not available in this charset", s);
}

GLOBAL void warning_cannot_recode ( const char c, const char *scs, const char *dcs )
{	/* scs = source char set */
	/* dcs = dest char set */
	char s[512];

	if (iUdopass==PASS2)	
	{	sprintf(s, "cannot convert %c (%s #%u) to %s", c, scs, ((unsigned char) c), dcs);
		warning_msg_solo(s);
	}
}

GLOBAL void warning_cannot_recode_utf8 ( const char *utf, const char *dcs )
{	/* utf = UTF-8 Characters (e.g. 0xC0 0x85) */
	/* dcs = dest char set */
	char s[512];

	if (iUdopass==PASS2)	
	{	sprintf(s, "can't convert UTF-8 (%s) to %s", utf, dcs);
		warning_msg_solo(s);
	}
}

GLOBAL void warning_no_isochar ( const char c )
{
	char s[2];

	sprintf(s, "%c", c);
	warning_msg_para("%s not available in ISO Latin 1", s);
}

GLOBAL void warning_no_texchar ( const char c )
{
	char s[2];

	sprintf(s, "%c", c);
	warning_msg_para("%s maybe not available in LaTeX", s);
}

GLOBAL void warning_split_verb ( void )
{
	warning_msg_solo("please use (!V) and (!v) in one paragraph");
}

GLOBAL void warning_node_too_deep ( void )
{
	warning_msg_solo("structure depth exceeded, using subsubsubnode");
}


/*	######################################################################
	# Abfrageroutinen fuer andere Routinen
	######################################################################	*/
GLOBAL int get_warning_counter ( void )
{	return(warning_counter);
}

GLOBAL int get_note_counter ( void )
{	return(note_counter);
}

GLOBAL int get_error_counter ( void )
{	return(error_counter);
}


/*	######################################################################
	# Modulinit
	######################################################################	*/
GLOBAL void init_module_msg ( void )
{
	error_counter= 0;
	warning_counter= 0;
	note_counter= 0;
}	/* init_module_msg */

/*	######################################################################
	# msg.c
	######################################################################	*/