1 /****^  ***********************************************************
 2         *                                                         *
 3         * Copyright, (C) Honeywell Bull Inc., 1988                *
 4         *                                                         *
 5         * Copyright, (C) Honeywell Information Systems Inc., 1982 *
 6         *                                                         *
 7         *********************************************************** */
 8 %;
 9 /* ******************************************************
10    *                                                    *
11    *                                                    *
12    * Copyright (c) 1972 by Massachusetts Institute of   *
13    * Technology and Honeywell Information Systems, Inc. *
14    *                                                    *
15    *                                                    *
16    ****************************************************** */
17 
18 
19 /****^  HISTORY COMMENTS:
20   1) change(2016-01-05,Swenson), approve(2016-01-05,MCR10002):
21      Fixed ALM buffer overrun error (ticket #89) that occurs on long source
22      pathnames.
23                                                    END HISTORY COMMENTS */
24 
25 prnam_:   proc( link );                 /* this procedure puts symbols in the listing for postp2_ by
26                                         faking a source line */
27 /*^L*/
28 %include varcom;
29 %include lstcom;
30 /*^L*/
31 dcl       (link, segname, symname)      ptr;
32 dcl       (count,count2)      fixed bin;
33 
34 dcl       1 array_overlay     based aligned,
35           2 words(count2)     bit(36) aligned;
36 
37 dcl       char      based char(1) aligned;
38 
39 dcl       1 eb_data_$oulst external, 2 oulst char(680) aligned;
40 /*^L*/
41           if tnolst ^= 0 then return;                                 /* ignore call if no listing */
42           count = fixed(unspec(substr(link->char,1,1)),9,0);          /* get the count of the string */
43           count2 = divide(count+4, 4, 17, 0);                         /* convert it to words */
44           addr(oulst) -> array_overlay = link -> array_overlay;       /* do a word by word move */
45 common:   substr(oulst, count+2, 1) = "
46 ";                                                                    /* append a new_line */
47           source_printed = "0"b;                                      /* set a flag so prwrd will print the line */
48           return;
49 /*^L*/
50 prnam2:   entry(segname, symname);      /* like prnam except takes two symbols and puts a | between them */
51           if tnolst ^= 0 then return;                                 /* ignore the call if no listing */
52           count = fixed(unspec(substr(segname->char,1,1)),9,0);       /* get the character count */
53           count2 = divide(count+4, 4, 17, 0);                         /* get the word count */
54           addr(oulst) -> array_overlay = segname -> array_overlay;    /* do a word by word move */
55           count = count + 1;                                          /* add a character for the count at the beginning */
56           substr(oulst, count+1, 1) = "|";                            /* put in the | */
57           count2 = fixed(unspec(substr(symname->char,1,1)),9,0);      /* get the character count of the second symbol */
58           substr(oulst, count+2, count2) = substr(symname->char, 2, count2);/*append it to the first*/
59           count = count + count2;                                     /* get the total count */
60           goto common;                                                /* and finish up */
61 /*^L*/
62           end prnam_;