Pristine Ack-5.5
[Ack-5.5.git] / lang / m2 / m2mm / misc.c
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  *
5  * Author: Ceriel J.H. Jacobs
6  */
7
8 /* M I S C E L L A N E O U S    R O U T I N E S */
9
10 /* stripped version from the one in the Modula-2 compiler */
11
12 /* $Id: misc.c,v 1.2 1994/06/24 12:45:25 ceriel Exp $ */
13
14 #include        "f_info.h"
15 #include        "idf.h"
16 #include        "LLlex.h"
17
18 struct idf *
19 gen_anon_idf()
20 {
21         /*      A new idf is created out of nowhere, to serve as an
22                 anonymous name.
23         */
24         static int name_cnt;
25         char buff[100];
26         char *sprint();
27
28         sprint(buff, "#%d in %s, line %u",
29                         ++name_cnt, FileName, LineNumber);
30         return str2idf(buff, 1);
31 }