mirror of https://github.com/mpv-player/mpv
cosmetics: Use a consistent formattting style; tabs to spaces.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30079 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
acd1630d1b
commit
cccb6f6d7e
|
@ -67,14 +67,12 @@ BEGIN {
|
|||
}
|
||||
first_pass = 1;
|
||||
init_name_db();
|
||||
while(getline <in_file)
|
||||
{
|
||||
while (getline < in_file) {
|
||||
# count up lines
|
||||
line++;
|
||||
n = split($0, field, "[\t]");
|
||||
name_field = kill_double_quoting(field[3])
|
||||
if(field[1] == "v" && length(field[3])>0 && field[4] == "0")
|
||||
{
|
||||
if (field[1] == "v" && length(field[3]) > 0 && field[4] == "0") {
|
||||
init_device_db()
|
||||
svend_name = get_short_vendor_name(field[3])
|
||||
printf("#define VENDOR_%s\t", svend_name) > vendor_file;
|
||||
|
@ -82,12 +80,11 @@ BEGIN {
|
|||
printf("0x%s /*%s*/\n", field[2], name_field) > vendor_file;
|
||||
if (with_pci_db) printf("{ 0x%s, \"%s\", dev_lst_%s },\n", field[2], name_field, field[2]) > name_file;
|
||||
printf("/* Vendor: %s: %s */\n", field[2], name_field) > ids_file
|
||||
if(first_pass == 1) { first_pass=0; }
|
||||
else { print "{ 0xFFFF, NULL }\n};" >dev_ids_file; }
|
||||
if (first_pass == 1) first_pass = 0;
|
||||
else print "{ 0xFFFF, NULL }\n};" > dev_ids_file;
|
||||
printf("static const struct device_id_s dev_lst_%s[] = {\n", field[2])> dev_ids_file
|
||||
}
|
||||
if(field[1] == "d" && length(field[3])>0 && field[4] == "0")
|
||||
{
|
||||
if (field[1] == "d" && length(field[3]) > 0 && field[4] == "0") {
|
||||
sdev_name = get_short_device_name(field[3])
|
||||
full_name = sprintf("#define DEVICE_%s_%s", svend_name, sdev_name);
|
||||
printf("%s\t", full_name) > ids_file
|
||||
|
@ -100,8 +97,7 @@ BEGIN {
|
|||
printf("0x%s /*%s*/\n", substr(field[2], 5), name_field) > ids_file
|
||||
printf("{ 0x%s, \"%s\" },\n", substr(field[2], 5), name_field) > dev_ids_file
|
||||
}
|
||||
if(field[1] == "s" && length(field[3])>0 && field[4] == "0")
|
||||
{
|
||||
if (field[1] == "s" && length(field[3]) > 0 && field[4] == "0") {
|
||||
subdev_name = get_short_subdevice_name(field[3])
|
||||
full_name = sprintf("#define SUBDEVICE_%s_%s", svend_name, subdev_name)
|
||||
printf("\t%s\t", full_name) > ids_file
|
||||
|
@ -235,8 +231,7 @@ function get_short_vendor_name(from)
|
|||
new_name = svendor;
|
||||
vend_suffix = 2;
|
||||
# check for unique
|
||||
while(new_name in vendor_names)
|
||||
{
|
||||
while (new_name in vendor_names) {
|
||||
new_name = sprintf("%s%u", svendor, vend_suffix)
|
||||
vend_suffix = vend_suffix + 1;
|
||||
}
|
||||
|
@ -257,8 +252,7 @@ function get_short_device_name(from_name)
|
|||
new_name = sdevice;
|
||||
dev_suffix = 2;
|
||||
# check for unique
|
||||
while(new_name in device_names)
|
||||
{
|
||||
while (new_name in device_names) {
|
||||
new_name = sprintf("%s%u", sdevice, dev_suffix)
|
||||
dev_suffix = dev_suffix + 1;
|
||||
}
|
||||
|
@ -279,8 +273,7 @@ function get_short_subdevice_name(from_name)
|
|||
new_name = ssdevice;
|
||||
sdev_suffix = 2;
|
||||
# check for unique
|
||||
while(new_name in subdevice_names)
|
||||
{
|
||||
while (new_name in subdevice_names) {
|
||||
new_name = sprintf("%s%u", ssdevice, sdev_suffix)
|
||||
sdev_suffix = sdev_suffix + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue