From 3770079e3090efda5304204f90cc5a726096a33e Mon Sep 17 00:00:00 2001 From: klirichek Date: Thu, 14 Aug 2014 17:26:52 +0700 Subject: [PATCH] little cosmetic refactor --- rastertozj.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/rastertozj.c b/rastertozj.c index 9ce10df..44afe7f 100644 --- a/rastertozj.c +++ b/rastertozj.c @@ -1,7 +1,3 @@ -/* - * Include necessary headers... - */ - // To get required headers, run // sudo apt-get install libcups2-dev libcupsimage2-dev #include @@ -199,18 +195,18 @@ void pageSetup() ////////////////////////////////////////////// int main(int argc, char *argv[]) { - int fd = 0; // File descriptor providing CUPS raster data + int fd = 0; // File descriptor providing CUPS raster data cups_raster_t * ras = NULL; // Raster stream for printing - cups_page_header2_t header; /* CUPS Page header */ - int page = 0; /* Current page */ - int y = 0; /* Vertical position in page 0 <= y <= header.cupsHeight */ + cups_page_header2_t header; // CUPS Page header + int page = 0; // Current page + int y = 0; // Vertical position in page 0 <= y <= header.cupsHeight - unsigned char * rasterData = NULL; /* Pointer to raster data */ - unsigned char * originalRasterDataPtr = NULL; /* Copy of original pointer for freeing buffer */ + unsigned char * rasterData = NULL; // Pointer to raster data from CUPS + unsigned char * originalRasterDataPtr = NULL; // Copy of original pointer for freeing buffer if (argc < 6 || argc > 7) { - fputs("ERROR: rastertozj58 job-id user title copies options [file]\n", stderr); + fputs("ERROR: rastertozj job-id user title copies options [file]\n", stderr); return EXIT_FAILURE; } @@ -352,4 +348,4 @@ int main(int argc, char *argv[]) return (page == 0)?EXIT_FAILURE:EXIT_SUCCESS; } -// end of rastertostar.c +// end of rastertozj.c