Write a C Program
2. mypager This utility displays the contents of a file as ASCII characters, one "page" at at time. By default, a page is equivalent to at most 20 lines of text, each line not having more than 80 characters displayed. It is, essentially, a crude version of the less Unix file utility. Following are the specifications 1. The usage of mypager is as follows: mypager
2. When started, it displays the first page of text, meaning up to 20 lines of text from the file, each line having 80 characters or less. 3. It then waits for user input. If the user presses the 'f' key, then the next page is displayed. If the user presses the 'q' key, then the utility quits. This user input code has already been written and is included within the main function 4. You will be supplied with an incomplete version of mypager.c that does not actually display any text. You are to modify several functions within mypager.c in order to make it work correctly. Specifically, you must revise three (3) functions, as follows: fetch_next line: this function retrieves the next line of text by repeatedly calling fetch_next_word; see mypager.c for more details - fetch_next word: this function retrieves the next word of text by reading bytes from a buffer; see mypager.c for more details refill_buffer: this function refills the buffer with bytes read from the file; see mypager.c for more details 5. You may not revise or add any other functions. 2. mypager This utility displays the contents of a file as ASCII characters, one "page" at at time. By default, a page is equivalent to at most 20 lines of text, each line not having more than 80 characters displayed. It is, essentially, a crude version of the less Unix file utility. Following are the specifications 1. The usage of mypager is as follows: mypager 2. When started, it displays the first page of text, meaning up to 20 lines of text from the file, each line having 80 characters or less. 3. It then waits for user input. If the user presses the 'f' key, then the next page is displayed. If the user presses the 'q' key, then the utility quits. This user input code has already been written and is included within the main function 4. You will be supplied with an incomplete version of mypager.c that does not actually display any text. You are to modify several functions within mypager.c in order to make it work correctly. Specifically, you must revise three (3) functions, as follows: fetch_next line: this function retrieves the next line of text by repeatedly calling fetch_next_word; see mypager.c for more details - fetch_next word: this function retrieves the next word of text by reading bytes from a buffer; see mypager.c for more details refill_buffer: this function refills the buffer with bytes read from the file; see mypager.c for more details 5. You may not revise or add any other functions