naivepq

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: Jason McAllister * Course and Section:cs1254 Section2 * Date:February 11, 2005 * Lab #: 1 * Instructor: William Duncan * LogonID: cs125477 */ #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 int 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
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.

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