int main(char rname, char area, char fname, char from, char tname) {
  // rname is the filename with path
  // area is the name of TICK-area
  // fname is the filename without path
  // from is the sender's name
  // tname is the filename of TICK-file

  /* if you repack the file (DON'T!) then you have to return the new filename in bv_filna. */

  if (strlen(fname)>4) {
    int rc=0;
    if (stupcase(copy(fname,strlen(fname)-3,4))==".JPG")
      rc=system(sprintf("djpeg -fast -pnm -dct fast -dither none -onepass %s -outfile /dev/null",rname),0,0);
    // djpeg should be modified to return 0 if unknown SOF (6b:jdmarker.c:1008)
    /*
    if (stupcase(copy(fname,strlen(fname)-3,4))==".GIF")
      rc=system(sprintf("cjpeg -quality 50 -dct fast %s -outfile /dev/null",rname),0,0);
    */
    if (stupcase(copy(fname,strlen(fname)-3,4))==".ZIP")
      rc=system(sprintf("unzip -t %s",rname),0,0);
    if (rc>0 && rc<10) return(1);
  }
  return(0); // 1=delete, 0=save
}
