All pastes #357958 Raw Edit

Something

public text v1 · immutable
·published 2007-02-16 00:15 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  system("TITLE tga-chop");
  FILE* tga1 = NULL;
  FILE* tga2 = NULL;
  tga1 = fopen(argv[1], "r");
  tga2 = fopen("output.tga", "w");
  char z,y[50000];
  int te = 0;
  int cur = 0;
        do
      {
      z = fgetc(tga1);
      y[cur] = z;
      te++;
      cur++;
       } while (z != EOF);
        int cur2 = 0;
        do
      {
        fputc(y[cur2],tga2);
        cur2++;
        } while (cur2 != (cur - 25));
        fclose(tga1);
        fclose(tga2);
  return 0;
}