1 /* 2 * fjobs.h -- Recording information about the file jobs 3 * copyright (c) 1995-99 Akim Demaille, Miguel Santana 4 */ 5 6 /* 7 * This file is part of a2ps. 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2, or (at your option) 12 * any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; see the file COPYING. If not, write to 21 * the Free Software Foundation, 59 Temple Place - Suite 330, 22 * Boston, MA 02111-1307, USA. 23 */ 24 25 #ifndef FJOBS_H_ 26 # define FJOBS_H_ 27 28 struct a2ps_job; 29 30 /* 31 * Relative to the current file 32 */ 33 struct file_job 34 { 35 uchar * name; /* Guess what it is :) */ 36 37 /* A tmp file associated with this file. It is used only privately 38 by a2ps-prog. If the file is delegated, the output of the 39 delegation is stored there. */ 40 char *delegation_tmpname; 41 42 /* The name under which this file is saved if it has to be delegated 43 and is actually stdin. */ 44 char *stdin_tmpname; 45 46 const char * type; /* i.e. ssh key, or UNPRINTABLE */ 47 bool is_toc; /* Is this a toc, or a real file (used 48 * when --pages=toc) */ 49 struct tm mod_tm; /* Modif. info for the file */ 50 bool printable; /* Can this file be printed? */ 51 bool is_stdin; /* Is this file named or given by stdin?*/ 52 int first_sheet; /* num of the first sheet for this file */ 53 int last_sheet; 54 int first_page; /* Id. but pages */ 55 int last_page; 56 int pages; /* These are defined because it eases */ 57 int sheets; /* delayed integers (cf. output_marker) */ 58 int num; /* No of the file in the args */ 59 int top_line; /* The top most line of the current page */ 60 int top_page; /* The first page appearing in curr sheet */ 61 int lines; /* Current line number */ 62 }; 63 64 65 /* in the output session JOB, create a new input session NAME */ 66 struct file_job * 67 _a2ps_file_job_new PARAMS ((uchar * name, int num, struct tm * run_tm)); 68 69 int file_name_cmp PARAMS ((struct file_job * f1, struct file_job * f2)); 70 71 void file_job_synchronize_sheets PARAMS ((struct a2ps_job * job)); 72 void file_job_synchronize_pages PARAMS ((struct a2ps_job * job)); 73 void file_job_self_print PARAMS ((struct file_job * file, FILE * stream)); 74 void file_job_unlink_tmpfile PARAMS ((struct file_job * file)); 75 void file_job_free PARAMS ((struct file_job * file_job)); 76 77 #endif /* !defined (_FJOBS_H) */ 78