Ignore:
Timestamp:
Mar 18, 2008, 9:36:56 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Get rid of ugly tabs and trailing spaces everywhere.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/keytest.cpp

    r56 r124  
    4343int key_fifo()
    4444{
    45   int fd,child_pid; 
     45  int fd,child_pid;
    4646  FILE *fp;
    4747  fp=popen("keydrv","r");
    48   fscanf(fp,"%d",&child_pid); 
     48  fscanf(fp,"%d",&child_pid);
    4949  pclose(fp);
    5050  do
    5151  { usleep(10000);
    52   } while (access("/tmp/jckey-driver",R_OK)); 
     52  } while (access("/tmp/jckey-driver",R_OK));
    5353  fd=open("/tmp/jckey-driver",O_RDONLY);
    5454  return fd;
     
    5959{
    6060  unsigned char key;
    61  
     61
    6262  int console_fd=key_fifo();
    6363  while (1)
     
    6565    if (fd_ready_to_read(console_fd))
    6666    {
    67       read(console_fd,&key,1);     
     67      read(console_fd,&key,1);
    6868      printf("read key (%d)\n\r",(int)key);
    69     } else usleep(10000);         
    70   } 
     69    } else usleep(10000);
     70  }
    7171}
Note: See TracChangeset for help on using the changeset viewer.