File: db_def_to_py

package info (click to toggle)
boinc 7.4.23%2Bdfsg-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 83,852 kB
  • sloc: cpp: 170,660; ansic: 58,078; php: 49,917; xml: 14,080; java: 13,585; python: 6,181; perl: 4,168; sh: 3,451; makefile: 2,096; sql: 1,192; objc: 572; csh: 126; pascal: 62; lisp: 47
file content (17 lines) | stat: -rwxr-xr-x 328 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env perl

## $Id$

## parse the db #defines to php.

## syntax: ./db_def_to_php < ../db/boinc_db.h > boinc_db.inc

print "# Generated by db_def_to_py\n";
# print "# Generated by db_def_to_py on ";
# system('date');

while (<>) {
    if (/^\s*#define\s+([^\s]+)\s+([0-9]+)\s*$/) {
        print qq/$1 = $2\n/;
    }
}