]> git.saurik.com Git - wxWidgets.git/blob - utils/Install/packace/uac_comm.c
changed version number
[wxWidgets.git] / utils / Install / packace / uac_comm.c
1 /* ------------------------------------------------------------------------ */
2 /* */
3 /* Decompresses and outputs comment if present. */
4 /* */
5 /* ------------------------------------------------------------------------ */
6
7 #include <stdio.h> // printf()
8
9 #include "globals.h"
10 #include "uac_dcpr.h"
11 #include "uac_comm.h"
12
13 INT comm_cpr_size=0;
14 CHAR *comm;
15
16 void comment_out(CHAR *top) // outputs comment if present
17 {
18 INT i;
19
20 if (head.HEAD_FLAGS & ACE_COMM)
21 { // comment present?
22 if (head.HEAD_TYPE == MAIN_BLK)
23 { // get begin and size of comment data
24 comm = (CHAR *)MCOMM;
25 comm_cpr_size = MCOMM_SIZE;
26 }
27 else
28 {
29 comm = (CHAR *)FCOMM;
30 comm_cpr_size = FCOMM_SIZE;
31 } // limit comment size if too big
32 i = sizeof(head) - (INT)(comm - (CHAR*) &head);
33 if (comm_cpr_size > i)
34 comm_cpr_size = i;
35 dcpr_comm(i); // decompress comment
36
37 #ifdef AMIGA
38 {
39 char *p=comm;
40 while (*p)
41 {
42 if (*p==0x0D)
43 *p=0x0A; // Replace ms-dos line termination
44 p++;
45 }
46 }
47 #endif
48
49 pipeit("%s\n\n%s\n\n", top, comm); // output comment
50 }
51 }