Listing 5: Setting the paper tray to number 2
/**********************************************************/
/* Filter to set the paper tray to number 2 */
/**********************************************************/
#include <stdio.h>
void main() {
char buf[1][BUFSIZ];
fgets(buf[0], BUFSIZ, stdin);
printf("%s", buf[0]);
printf("statusdict begin 2 setpapertray\n");
fgets(buf[0], BUFSIZ, stdin);
while (!feof(stdin)) {
printf("%s", buf[0]);
fgets(buf[0], BUFSIZ, stdin);
}
}
|