~ubuntu-branches/ubuntu/precise/9base/precise

« back to all changes in this revision

Viewing changes to lib9/testprint.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-08-20 17:34:06 UTC
  • mfrom: (6.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090820173406-xpwqa9ruyevvc0ut
Tags: 1:3-3
* Updating maintainer field.
* Updating vcs fields.
* Updating package to standards version 3.8.3.
* Updatin variables writing in rules to consistent style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <u.h>
 
2
#include <libc.h>
 
3
 
 
4
void
 
5
main(int argc, char **argv)
 
6
{
 
7
        char c;
 
8
        
 
9
        c = argv[1][strlen(argv[1])-1];
 
10
        if(c == 'f' || c == 'e' || c == 'g' || c == 'F' || c == 'E' || c == 'G')
 
11
                print(argv[1], atof(argv[2]));
 
12
        else if(c == 'x' || c == 'u' || c == 'd' || c == 'c' || c == 'C' || c == 'X')
 
13
                print(argv[1], atoi(argv[2]));
 
14
}