|
|
1.1 ! root 1: /* ! 2: * File: idtune_var.c ! 3: * ! 4: * Purpose: Write a line "variable_name" "value" to the right file ! 5: * ! 6: * Revised: Fri Jul 30 11:38:24 1993 CDT ! 7: */ ! 8: ! 9: /* ! 10: * ---------------------------------------------------------------------- ! 11: * Includes. ! 12: */ ! 13: #include <stdio.h> ! 14: #include "build0.h" ! 15: ! 16: /* ! 17: * ---------------------------------------------------------------------- ! 18: * Definitions. ! 19: * Constants. ! 20: * Macros with argument lists. ! 21: * Typedefs. ! 22: * Enums. ! 23: */ ! 24: ! 25: /* ! 26: * ---------------------------------------------------------------------- ! 27: * Functions. ! 28: * Import Functions. ! 29: * Export Functions. ! 30: * Local Functions. ! 31: */ ! 32: void idtune_var __PROTO((char * varName, long varValue)); ! 33: ! 34: /* ! 35: * ---------------------------------------------------------------------- ! 36: * Global Data. ! 37: * Import Variables. ! 38: * Export Variables. ! 39: * Local Variables. ! 40: */ ! 41: ! 42: /* ! 43: * ---------------------------------------------------------------------- ! 44: * Code. ! 45: */ ! 46: ! 47: /************************************************************************ ! 48: * idtune_var ! 49: * ! 50: ***********************************************************************/ ! 51: #if __USE_PROTO__ ! 52: void idtune_var (char * varName, long varValue) ! 53: #else ! 54: void ! 55: idtune_var (varName, varValue) ! 56: char * varName; ! 57: long varValue; ! 58: #endif ! 59: { ! 60: FILE * fp; ! 61: ! 62: if ((fp = fopen(IDVARFILE, "a")) == NULL) { ! 63: fprintf(stderr, "Can't append to %s\n", IDVARFILE); ! 64: exit(1); ! 65: } ! 66: ! 67: fprintf(fp, "%s\t0x%x\n", varName, varValue); ! 68: ! 69: fclose(fp); ! 70: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.