FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

code cleanup · gnuplot/gnuplot@d6cacd4 · GitHub

Repository navigation

Commit d6cacd4

Browse files
Ethan Merritt
committed
code cleanup
1 parent 40a0e89 commit d6cacd4

4 files changed

Lines changed: 21 additions & 22 deletions

File tree

‎ChangeLog‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2005-05-22 Ethan Merritt <merritt@u.washington.edu>
2+
3+
* term/gd.trm term/mif.trm term/pdf.trm: Code cleanup - remove static
4+
initializers from the TERM_PROTO code block. ggi.trm has these also,
5+
but I can't test for correctness after a change so I don't want to
6+
change it. Remove obsolete comments.
7+
18
2005-05-20 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
29

310
* src/util.c (PRINT_MESSAGE_TO_STDERR): New macro: invokes printf
@@ -14,7 +21,6 @@
1421
* history.c: Make routines for GNU readline compatible to those of
1522
gnuplot readline.
1623

17-
1824
2005-05-19 Ethan Merritt <merritt@u.washington.edu>
1925

2026
* src/datafile.c (df_readline) src/gadgets.h src/save.c (save_set_all)

‎term/gd.trm‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Hello, Emacs, this is -*-C-*-
2-
* $Id: gd.trm,v 1.66 2005/04/03 22:41:55 sfeam Exp $
2+
* $Id: gd.trm,v 1.68 2005/04/29 17:03:36 sfeam Exp $
33
* based on gif.trm,v 1.26.2.1 2000/05/01 00:17:20 joze
44
*/
55

@@ -157,16 +157,9 @@ extern gdFontPtr gdFontMediumBold; /* 7x13 */
157157
extern gdFontPtr gdFontGiant; /* 9x15 */
158158
extern gdFontPtr gdFontTiny; /* 5x8 */
159159

160-
161160
#define GREG_XMAX 640
162161
#define GREG_YMAX 480
163162

164-
165-
static int PNG_XMAX = GREG_XMAX;
166-
static int PNG_YMAX = GREG_YMAX;
167-
static const int PNG_POINT_SCALE = 3;
168-
static int PNG_ps = 3;
169-
170163
/* This will be the default font */
171164
# define gdfont gdFontMediumBold
172165
# define PNG_VCHAR 13
@@ -244,6 +237,11 @@ enum PNG_id {
244237
#endif
245238
#define Y(y) (png_state.height - (y))
246239

240+
static int PNG_XMAX = GREG_XMAX;
241+
static int PNG_YMAX = GREG_YMAX;
242+
static const int PNG_POINT_SCALE = 3;
243+
static int PNG_ps = 3;
244+
247245
static struct gen_table PNG_opts[] =
248246
{
249247
{ "trans$parent", PNG_TRANSPARENT },
@@ -1703,16 +1701,14 @@ ENHGD_put_text(unsigned int x, unsigned int y, const char *str)
17031701
return;
17041702
}
17051703

1706-
/* flush any pending graphics (all the XShow routines do this...) */
1707-
17081704
if (!strlen(str))
17091705
return;
17101706

17111707
/* if there are no magic characters, we should just be able
17121708
* punt the string to PNG_put_text()
17131709
*/
17141710
if (!strpbrk(str, "{}^_@&~")) {
1715-
/* do something to ensure default font is selected */
1711+
/* FIXME: do something to ensure default font is selected */
17161712
PNG_put_text(x,y,str);
17171713
return;
17181714
}

‎term/mif.trm‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Hello, Emacs, this is -*-C-*-
2-
* $Id: mif.trm,v 1.27 2004/07/01 17:10:33 broeker Exp $
2+
* $Id: mif.trm,v 1.28 2005/03/03 04:09:51 sfeam Exp $
33
*/
44

55
/* GNUPLOT -- mif.trm */
@@ -138,6 +138,11 @@ static void put_mif_line __PROTO((void));
138138
static void MIF_set_font __PROTO((const char *));
139139
static void mif_put_point __PROTO((unsigned int x, unsigned int y, int np));
140140

141+
#endif
142+
143+
#ifndef TERM_PROTO_ONLY
144+
#ifdef TERM_BODY
145+
141146
#ifndef cfree
142147
# define cfree free
143148
#endif
@@ -236,12 +241,6 @@ static struct mpt mpt[POINT_TYPES + 1] =
236241
/* diamond is offset 0, dot is offset -1 */
237242
static struct mpt *mif_point = &(mpt[1]);
238243

239-
#endif
240-
241-
242-
#ifndef TERM_PROTO_ONLY
243-
#ifdef TERM_BODY
244-
245244

246245
/** Declaration of routine/s for internal use **/
247246
static int insert_mif_line __PROTO((double fx, double fy));

‎term/pdf.trm‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Hello, Emacs, this is -*-C-*-
2-
* $Id: pdf.trm,v 1.50 2005/03/09 18:26:44 sfeam Exp $
2+
* $Id: pdf.trm,v 1.51 2005/04/29 16:36:07 sfeam Exp $
33
*/
44

55
/*------------------------------
@@ -1476,8 +1476,6 @@ ENHPDF_put_text(unsigned int x, unsigned int y, const char *str)
14761476
return;
14771477
}
14781478

1479-
/* flush any pending graphics (all the XShow routines do this...) */
1480-
14811479
if (!str || !strlen(str))
14821480
return;
14831481

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL