~ubuntu-branches/ubuntu/lucid/fceux/lucid

« back to all changes in this revision

Viewing changes to fceu/src/fir/toh.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-12-14 08:05:17 UTC
  • Revision ID: james.westby@ubuntu.com-20091214080517-abi5tj8avthfan7c
Tags: upstream-2.1.2+repack
ImportĀ upstreamĀ versionĀ 2.1.2+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
 
 
3
#define MAX        512
 
4
 
 
5
main()
 
6
{
 
7
 char buf[256];
 
8
 int count=0;
 
9
 
 
10
 while(fgets(buf,256,stdin)>0)
 
11
 {
 
12
  double p;
 
13
 
 
14
  if(sscanf(buf,"%lf",&p)==1)
 
15
  {
 
16
   p*=65536*16;
 
17
   printf("%ld,\n",(long)p);
 
18
   count++;
 
19
   if(count==MAX) break;
 
20
  }
 
21
 
 
22
 }
 
23
 
 
24
}