//========================================================================= #define PROGRAMMER "DOE, John" #define PROG_CODE "doej" #define COURSE "ECE-1021" #define YEAR (2003) #define TERM "Fall" #define SECTION (0) #define ASSIGNMENT "HW #0A" #define REVISION (0) #define TITLE "Template for Source Code Files" #define SUBTITLE "Last Modified on 11 MAR 04" #define EMAIL "emailname@domain.com" #define FILENAME "template.c" //========================================================================= //========================================================================= // PROBLEM //========================================================================= // // In this section, type a brief description of the problem. // //========================================================================= // PSEUDOCODE //========================================================================= // // You should include at least a top level breakdown of the tasks // that the program will perform. // // In general, do NOT include the entire pseudocode, just the upper // few levels. //========================================================================= // DEVIATIONS FROM SUBMITTED PSEUDOCODE //========================================================================= // // In this section you should list any differences between the pseudocode // you submitted for grading and the program as you implemented it. // // If you did not submit any pseudocode, then you must put your entire // pseudocode here or lose even more points. //========================================================================= // WAIVED COMPILER WARNINGS //========================================================================= // // In this section you should list any compiler warnings that remain and // why you are accepting them. It is acceptable to indicate that the // the reason is that you don't know how to get rid of it. // // Linker Warning: No module definition file specified: using defaults // Reason for Waiver: Can't suppress. Does not have adverse impact. //========================================================================= // CODE SECTION //========================================================================= //== INCLUDE FILES ======================================================== #include // printf() //== MACRO DEFINITIONS ==================================================== #define FALSE (0) #define TRUE (!FALSE) #define BLANKLINE printf("\n") //== FUNCTION PROTOTYPES (for Primary Functions) ========================== void PrintHeader(void); //== MAIN FUNCTION ======================================================== int main(void) { PrintHeader(); BLANKLINE; return(0); } //========================================================================= // PRIMARY FUNCTIONS (functions called directly by main() ) //========================================================================= //== FUNCTION PROTOTYPES (for Support Functions) ========================== int printc(char c, int n); //== PRIMARY FUNCTIONS ==================================================== void PrintHeader(void) { printc('=', 79); printf("\n"); printf("Course....... %s-%i (%s %i)\n", COURSE, SECTION, TERM, YEAR); printf("Programmer... %s (%s)\n", PROGRAMMER, PROG_CODE); printf("Assignment... %s (Rev %i) (Source Code in %s)\n", ASSIGNMENT, REVISION, FILENAME); printf("Description.. %s\n", TITLE); printf(" %s\n", SUBTITLE); printc('=', 79); printf("\n"); return; } //========================================================================= // SUPPORT FUNCTIONS (functions not called directly by main() ) //========================================================================= int printc(char c, int n) { while(0 < n--) printf("%c", c); return(n); }