Skip to content

Commit

Permalink
Update to new coding standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
anachrocomputer committed May 5, 2019
1 parent 1fd2adc commit 959b7e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plottext.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@

#define MAXX (15970.0)

int main (int argc, const char *argv[])
int main(int argc, char * const argv[])
{
int len;
double width = MAXX / 40.0; /* Width of plotter, in mm */
const double width = MAXX / 40.0; /* Width of plotter, in mm */
double effchars; /* Effective chars, allowing for spacing */
double size; /* Text size (height) required, in mm */

if (argc < 2) {
fputs ("Usage: plottext <string>\n", stderr);
exit (1);
fputs("Usage: plottext <string>\n", stderr);
exit(1);
}

len = strlen (argv[1]);
len = strlen(argv[1]);
effchars = ((double)len) + 0.25;
effchars *= 1.5; /* Char cell 1.5 times actual char width */
size = (width / effchars) * 1.31579;

turtle (DEV_HPGL, SIZ_A3, ORI_LAND, FLG_NONE);
turtle(DEV_HPGL, SIZ_A3, ORI_LAND, FLG_NONE);

title (argv[1], size, MID|CENTRE, FLG_NONE);
title(argv[1], size, MID|CENTRE, FLG_NONE);

show ();
show();

return (0);
}

0 comments on commit 959b7e8

Please sign in to comment.