naivepq - /* * File: naivepq.h * Description: Interface...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * File: naivepq.h * Description: Interface file for the naive printq personal * library. * Name: */ #define MAX_JOBS 100 /* User-defined type definitions */ typedef char string[80]; /* define jobtype enumerated type and job struct below. */ typedef enum _jobtype {TEXT, IMAGE, HTML, POSTSCRIPT, OTHERS} jobtype; typedef struct _job { int id; jobtype kind; long duration; int pages; string who; } job; /* public functions: Implementation for these functions are in naivepq.c */ /* Function: addjob * Usage: retval = addjob(printq,numjobs); * This function assigns adds a new job to the printq. If there * are already MAX_JOBS in the print queue, the retval is set * to 0 indicating failure: the queue is full and a new job * cannot be added and numjobs remains unchanged. * If the queue is not full, the function calls assignjobid * to obtain a unique id for the new job. The user is then prompted * for other details about the job: * kind -> TEXT, IMAGE, HTML, POSTSCRIPT or OTHERS * pages -> number of pages
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.

Page1 / 2

naivepq - /* * File: naivepq.h * Description: Interface...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online