summaryrefslogtreecommitdiff
path: root/dviware/ln03/rose/dvi2ln3.dif
blob: 56d9066f2e11e5bf4bcd9e8a1c751edb602a1539 (plain)
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
-----------------------------------------------------------------------------------------------------------------------------------
File USER$1:[ROSE.TG.C]DVI2LN3.C;48                              |  File USER$1:[ROSE.TG.UNIX]DVI2LN3.C;1                          
-------------------------------- 3 --------------------------------------------------------------- 3 ------------------------------
Dvi2ln3 is still being developed. Copyright (c) 1985, 1986 by D  |  Dvi2ln3 is still being developed. Copyright (c) 1985, 1986, 198
-------------------------------- 62 -------------------------------------------------------------- 62 -----------------------------
3/4/86:   Support for landscape added -- very easy, if only I h  |                                                                 
          known. Fixed bug found by Mark DeVries, error returne  |                                                                 
          if \special selects device other than LN03. Version 8  |                                                                 
                                                                 |                                                                 
-------------------------------- 86 -------------------------------------------------------------- 82 -----------------------------
#endif                                                           |  char *strchr(), *malloc(), *getenv();                          
                                                                 |  #endif                                                         
/* Here begins a long list of global variables. */               |                                                                 
-------------------------------- 120 ------------------------------------------------------------- 115 ----------------------------
/* landscape says whether we are printing in landscape or portr  |                                                                 
                                                                 |                                                                 
GLOBAL char landscape;                                           |                                                                 
                                                                 |                                                                 
-------------------------------- 139 ------------------------------------------------------------- 130 ----------------------------
    printf("\n Dvi2ln3 8");                                      |      printf("\n Dvi2ln3 7");                                    
-------------------------------- 151 ------------------------------------------------------------- 142 ----------------------------
    find_VMS_filename(infnam,&jnam,&jext);                       |      find_ULTRIX_filename(infnam,&jnam,&jext);                  
-------------------------------- 163 ------------------------------------------------------------- 154 ----------------------------
    landscape = 0;                                               |                                                                 
-------------------------------- 170 ------------------------------------------------------------- 160 ----------------------------
    if (rewind(dvifile) == -1) {                                 |      rewind(dvifile);                                           
        printf("\n Couldn't rewind dvi file.");                  |                                                                 
        goto exit_label;                                         |                                                                 
    }                                                            |                                                                 
-------------------------------- 189 ------------------------------------------------------------- 176 ----------------------------
    ;                                                            |      printf("\n");                                              
}                                                                |  }                                                              
                                                                 |                                                                 
/* Find_VMS_filename finds the filename part of a VMS filespec   |  /* find_ULTRIX_filename finds the filename part of a VMS filesp
-------------------------------- 201 ------------------------------------------------------------- 188 ----------------------------
int find_VMS_filename(s,ns,ne)                                   |  int find_ULTRIX_filename(s,ns,ne)                              
-------------------------------- 210 ------------------------------------------------------------- 197 ----------------------------
        if (s[j] == ':' || s[j] == ']' ||                        |          if (s[j] == '/') {                                     
            s[j] == '>') {                                       |                                                                 
-------------------------------- 219 ------------------------------------------------------------- 205 ----------------------------
        if (s[j] == '.' || s[j] == ';') {                        |          if (s[j] == '.') {                                     
-------------------------------- 260 ------------------------------------------------------------- 246 ----------------------------
second identifying longword is 8 and third is 3.                 |  second identifying longword is 8 and third is 3. */            
                                                                 |                                                                 
The L option says print in landscape.                            |  /* [[The toupper's below cause difficulty under Ultrix. Probabl
                                                                 |  can be fixed by #including <ctype.h>.]] */                     
[[Is a European option needed?]] */                              |                                                                 
-------------------------------- 283 ------------------------------------------------------------- 268 ----------------------------
        if (toupper(t[0]) == 'L') landscape = 1;                 |                                                                 
-------------------------------- 327 ------------------------------------------------------------- 311 ----------------------------
    jj = creat(outfnam,0);                                       |      jj = creat(outfnam, 0700);                                 
-------------------------------- 749 ------------------------------------------------------------- 733 ----------------------------
/* The margins are set to values that seem appropriate for Amer  |  /* The margins are set to values appropriate for American 8 1/2
by 11" paper. It is not clear if this needs to be changed for E  |  paper. It is not clear if this needs to be changed for European
paper. Not changing it might deprive Europeans of access to the  |  Not changing it might deprive Europeans of access to the bottom
1.5cm of their paper.                                            |  their paper. */                                                
                                                                 |                                                                 
It is not clear what the printable area is, or what happens whe  |      maxrmar = 2550;                                            
exceeded. */                                                     |      maxbmar = 3300;                                            
                                                                 |                                                                 
    if (landscape == 1) {                                        |  /* In the following, esc[?27h means "advance the carriage by th
        maxrmar = 3300;                                          |  width when you set a character", esc[11h and esc[7 I together m
        maxbmar = 2475;                                          |  interpret all dimensions in escape sequences as pixel units; es
    } else {                                                     |  our origin of coordinates is the upper left edge of the paper; 
        maxrmar = 2550;                                          |  means the "maximum length" of the paper is maxbmar pixels. */  
        maxbmar = 3300;                                          |                                                                 
    }                                                            |      fprintf(outfile,"\033c\033[?27h\033[11h\033[7 I\033[?52h\03
                                                                 |                                                                 
/* In the following, esc[?21 J means print in landscape, esc[?2  |                                                                 
"advance the carriage by the character width when you set a cha  |                                                                 
esc[11h and esc[7 I together mean to interpret all dimensions i  |                                                                 
sequences as pixel units; esc[?52h means our origin of coordina  |                                                                 
upper left edge of the paper; esc[%dt means the "maximum length  |                                                                 
paper is maxbmar pixels. */                                      |                                                                 
                                                                 |                                                                 
    fprintf(outfile,"\033c");                                    |                                                                 
    if (landscape == 1) fprintf(outfile,"\033[?21 J");           |                                                                 
    fprintf(outfile,"\033[?27h\033[11h\033[7 I\033[?52h\033[%dt  |                                                                 
-------------------------------- 919 ------------------------------------------------------------- 892 ----------------------------
    fprintf(outfile,"\n;Dvi2ln3 8 font load\033\\");             |      fprintf(outfile,"\n;Dvi2ln3 7 font load\033\\");           
-------------------------------- 1127 ------------------------------------------------------------ 1100 ---------------------------
about Dvi2ln3 even though the error is in their TeX file).       |  about Dvi2ln3 even though the error is in their TeX file). In m
                                                                 |  dvi2ln3 takes no special action at all, since the LN03 will cli
In most cases, dvi2ln3 takes no special action at all, since th  |  for us. Unfortunately, the LN03 doesn't let us specify negative
clip the glyphs for us. Unfortunately, the LN03 doesn't let us   |  or vertical positions, so we have to clip glyphs at such positi
negative horizontal or vertical positions, so we have to clip g  |  ourselves. The following code accomplishes that: */            
such positions away ourselves. Also, if one sets at a position   |                                                                 
bottom margin, the LN03 will eject a page, so glyphs that are s  |                                                                 
that margin also have to be clipped by hand.                     |                                                                 
                                                                 |                                                                 
The following code accomplishes that: */                         |                                                                 
-------------------------------- 1141 ------------------------------------------------------------ 1109 ---------------------------
            if (vv+voff > 0 && vv+voff <= maxbmar && hh+hoff >   |              if (vv+voff > 0 && hh+hoff > 0) {                  
-------------------------------- 1481 ------------------------------------------------------------ 1449 ---------------------------
                                                                 |      char *texfontdir;                                          
    find_VMS_filename(font_name[nf],&jnam,&jext);                |                                                                 
                                                                 |      find_ULTRIX_filename(font_name[nf],&jnam,&jext);           
-------------------------------- 1487 ------------------------------------------------------------ 1456 ---------------------------
    if (jnam == 0) strcpy(filespec,"tex$fonts:");                |      if (jnam == 0) texfontdir = getenv("TEX_FONTS");           
                                                                 |      strcpy(filespec,texfontdir);                               
                                                                 |      strcat(filespec,"/");                                      
-----------------------------------------------------------------------------------------------------------------------------------

Number of difference sections found: 21
Number of difference records found: 78

DIFFERENCES /IGNORE=()/OUTPUT=USER$1:[ROSE.TG.C]DVI2LN3.DIF;1/PARALLEL-
    USER$1:[ROSE.TG.C]DVI2LN3.C;48-
    USER$1:[ROSE.TG.UNIX]DVI2LN3.C;1