~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/lua/simple/example.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* File : example.c */
 
2
 
 
3
/* A global variable */
 
4
double Foo = 3.0;
 
5
 
 
6
/* Compute the greatest common divisor of positive integers */
 
7
int gcd(int x, int y) {
 
8
  int g;
 
9
  g = y;
 
10
  while (x > 0) {
 
11
    g = x;
 
12
    x = y % x;
 
13
    y = g;
 
14
  }
 
15
  return g;
 
16
}
 
17
 
 
18