From f09e17c3c564e8310125a10c03397cbf473ff643 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 1 Jul 2020 18:03:10 +0200 Subject: Remove $Id$ tags, update URL's, and more - remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers. --- src/drivers/Posix/Fl_Posix_Printer_Driver.cxx | 45 +++++++++++---------------- src/drivers/Posix/Fl_Posix_System_Driver.H | 10 ++---- src/drivers/Posix/Fl_Posix_System_Driver.cxx | 14 +++------ 3 files changed, 25 insertions(+), 44 deletions(-) (limited to 'src/drivers/Posix') diff --git a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx index bf206070e..dbb966a76 100644 --- a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx @@ -1,6 +1,4 @@ // -// "$Id$" -// // PostScript priting support for the Fast Light Tool Kit (FLTK). // // Copyright 2010-2016 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems to: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #include "../../config_lib.h" @@ -54,14 +52,14 @@ public: typedef struct _GtkPrintJob GtkPrintJob; typedef struct _GtkWidget GtkWidget; struct GError; - + GtkPrintJob *pjob; // data shared between begin_job() and end_job() char tmpfilename[50]; // name of temporary PostScript file containing to-be-printed data virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message=NULL); virtual void end_job(); static bool probe_for_GTK(); static void *ptr_gtk; // points to the GTK dynamic lib or NULL - + typedef GtkPrintUnixDialog* (*gtk_print_unix_dialog_new_t)(const char*, void*); typedef int (*gtk_dialog_run_t)(GtkDialog*); typedef GtkPrintSettings *(*gtk_print_unix_dialog_get_settings_t)(GtkPrintUnixDialog*); @@ -106,7 +104,7 @@ bool Fl_GTK_Printer_Driver::probe_for_GTK() { int Fl_GTK_Printer_Driver::begin_job(int pagecount, int *firstpage, int *lastpage, char **perr_message) { enum Fl_Paged_Device::Page_Format format = Fl_Paged_Device::A4; enum Fl_Paged_Device::Page_Layout layout = Fl_Paged_Device::PORTRAIT ; - + GtkPrintUnixDialog *pdialog = CALL_GTK(gtk_print_unix_dialog_new)(Fl_Printer::dialog_title, NULL); //2.10 if (dlsym(ptr_gtk, "gtk_get_major_version") || !CALL_GTK(gtk_check_version)(2, 18, 0)) CALL_GTK(gtk_print_unix_dialog_set_embed_page_setup)(pdialog, true); //2.18 @@ -236,7 +234,7 @@ Fl_Paged_Device* Fl_Printer::newPrinterDriver(void) int Fl_Posix_Printer_Driver::begin_job(int pages, int *firstpage, int *lastpage, char **perr_message) { enum Fl_Paged_Device::Page_Format format; enum Fl_Paged_Device::Page_Layout layout; - + // first test version for print dialog if (!print_panel) make_print_panel(); printing_style style = print_load(); @@ -247,12 +245,12 @@ int Fl_Posix_Printer_Driver::begin_job(int pages, int *firstpage, int *lastpage, { char tmp[10]; snprintf(tmp, sizeof(tmp), "%d", pages); print_to->value(tmp); } print_panel->show(); // this is modal while (print_panel->shown()) Fl::wait(); - + if (!print_start) // user clicked cancel return 1; - + // get options - + switch (print_page_size->value()) { case 0: format = Fl_Paged_Device::LETTER; @@ -281,7 +279,7 @@ int Fl_Posix_Printer_Driver::begin_job(int pages, int *firstpage, int *lastpage, default: format = Fl_Paged_Device::A4; } - + { // page range choice int from = 1, to = pages; if (print_pages->value()) { @@ -295,29 +293,29 @@ int Fl_Posix_Printer_Driver::begin_job(int pages, int *firstpage, int *lastpage, if (lastpage) *lastpage = to; if (pages > 0) pages = to - from + 1; } - + if (print_output_mode[0]->value()) layout = Fl_Paged_Device::PORTRAIT; else if (print_output_mode[1]->value()) layout = Fl_Paged_Device::LANDSCAPE; else if (print_output_mode[2]->value()) layout = Fl_Paged_Device::PORTRAIT; else layout = Fl_Paged_Device::LANDSCAPE; - - int print_pipe = print_choice->value(); // 0 = print to file, >0 = printer (pipe) - + + int print_pipe = print_choice->value(); // 0 = print to file, >0 = printer (pipe) + const char *media = print_page_size->text(print_page_size->value()); const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data(); if (!print_pipe) printer = ""; - + if (!print_pipe) // fall back to file printing return Fl_PostScript_File_Device::begin_job (pages, format, layout); - + // Print: pipe the output into the lp command... - + char command[1024]; if (style == SystemV) snprintf(command, sizeof(command), "lp -s -d %s -n %d -t '%s' -o media=%s", printer, print_collate_button->value() ? 1 : (int)(print_copies->value() + 0.5), "FLTK", media); else snprintf(command, sizeof(command), "lpr -h -P%s -#%d -T FLTK ", printer, print_collate_button->value() ? 1 : (int)(print_copies->value() + 0.5)); - + Fl_PostScript_Graphics_Driver *ps = driver(); ps->output = popen(command, "w"); if (!ps->output) { @@ -333,8 +331,3 @@ int Fl_Posix_Printer_Driver::begin_job(int pages, int *firstpage, int *lastpage, } #endif // defined(FL_CFG_PRN_PS) && !defined(FL_NO_PRINT_SUPPORT) - - -// -// End of "$Id$". -// diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H index 407fa0270..55255b83f 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.H +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -1,6 +1,4 @@ // -// "$Id$" -// // Definition of POSIX system driver // for the Fast Light Tool Kit (FLTK). // @@ -12,9 +10,9 @@ // // https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// https://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // /** @@ -79,7 +77,3 @@ public: }; #endif // FL_POSIX_SYSTEM_DRIVER_H - -// -// End of "$Id$". -// diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index 0cb16e585..d39ea6c82 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -1,6 +1,4 @@ // -// "$Id$" -// // Definition of Apple Darwin system driver. // // Copyright 1998-2017 by Bill Spitzak and others. @@ -9,11 +7,11 @@ // the file "COPYING" which should have been included with this file. If this // file is missing or damaged, see the license at: // -// http://www.fltk.org/COPYING.php +// https://www.fltk.org/COPYING.php // -// Please report all bugs and problems on the following page: +// Please see the following page on how to report bugs and issues: // -// http://www.fltk.org/str.php +// https://www.fltk.org/bugs.php // #include @@ -90,7 +88,7 @@ void *Fl_Posix_System_Driver::dlopen(const char *filename) int Fl_Posix_System_Driver::file_type(const char *filename) { int filetype; - struct stat fileinfo; // Information on file + struct stat fileinfo; // Information on file if (!::stat(filename, &fileinfo)) { if (S_ISDIR(fileinfo.st_mode)) @@ -128,7 +126,3 @@ void Fl_Posix_System_Driver::gettime(time_t *sec, int *usec) { *sec = tv.tv_sec; *usec = tv.tv_usec; } - -// -// End of "$Id$". -// -- cgit v1.2.3