예제 #1
0
파일: main.c 프로젝트: vikks143/atclib
int main () {
  
  int max;  /* max length seen so far*/
  char line[MAXLINE];  /* current input line */
  char longest[MAXLINE]; /* longest line save here */
  
  max = 0;  
  FILE *fr = NULL;
  FILE *fw = NULL;
  fr = fopen ("at.txt", "r");
  fw = fopen ("wt.txt", "w");
  if (fr == NULL || fw == NULL) {
    printf ("\nFile can't open !");
    exit (0);
  }
  
  while((getLine(line, MAXLINE,  fr)) > 0) {
    if (atRemove(line) > 0) {
      fputs(line, fw);
      printf ("\nLine = %s\n", line);
    }
  }
  // close file 
  fclose (fr);
  fclose (fw);
  return 0;
}
예제 #2
0
void TNSCollection::atFree( ccIndex index )
{
    void *item = at( index );
    atRemove( index );
    freeItem( item );
}
예제 #3
0
void TNSCollection::remove( void *item )
{
    atRemove( indexOf(item) );
}