All pastes #357957 Raw Edit

Stuff

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;
  int cur = 0;
  int cur2 = 0;
  char y[cur2];
        do
      {
      z = fgetc(tga1);
      y[cur] = z;
      cur++;
       } while (z != EOF);
        do
      {
        fputc(y[cur2],tga2);
        cur2++;
        } while (cur2 != (cur - 25));
        fclose(tga1);
        fclose(tga2);
  return 0;
}