This is IconInfo.c in view mode; [Download] [Up]
/* Program: IconInfo - generates compile time files for Unknown application * * Author: Christopher Lane * Symbolic Systems Resources Group * Knowledge Systems Laboratory * Stanford University * * Date: 9 October 1989 * * Copyright: 1989 by The Leland Stanford Junior University. This program * may be distributed without restriction for non-commercial use. */ #include <stdio.h> #include <stdlib.h> #define DOCFILE "Makefile.docicons" #define ICONFILE "Unknown.iconheader" #define SECTIONFILE "Makefile.iconsections" #define APP "app" #define BUFFERSIZE 512 void sys_error(char *string) { perror(string); exit(EXIT_FAILURE); } void main(int argc, char *argv[]) { FILE *dfd, *ifd, *sfd; int c, n = 0; char extension[BUFFERSIZE], application[BUFFERSIZE]; if ((dfd = fopen(DOCFILE, "w")) == NULL) sys_error("fopen"); if ((ifd = fopen(ICONFILE, "w")) == NULL) sys_error("fopen"); if ((sfd = fopen(SECTIONFILE, "w")) == NULL) sys_error("fopen"); fprintf(dfd, "DOCICONS ="); fprintf(sfd, "ICONSECTIONS ="); while((c = scanf(" %s %s ", &extension, &application)) != EOF) { if (c < 2) { fprintf(stderr, "Invalid iconinfo file!\n"); exit(EXIT_FAILURE); } if (n != 0) fprintf(dfd, " \\\n $(TIFFILEDIR)%s.tiff", extension); fprintf(ifd, "%s\t%s\t%s\t%s\n", (n ? "S" : "F"), extension, application, (n ? extension : APP)); fprintf(sfd, " \\\n -segcreate __ICON %s $(TIFFILEDIR)%s.tiff", (n ? extension : APP), extension); n++; } fprintf(dfd, "\n"); fprintf(sfd, "\n"); fclose(dfd); fclose(ifd); fclose(sfd); exit(EXIT_SUCCESS); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.