我正在查看一些我感到困惑的代码。
此代码段位于头文件RPI.h中:
来自RPI.c文件:
with t(x,y,z) as (values(1,3,2),(5,2,3))
select *, least((x,'x'::text),(y,'y'::text),(z,'z'::text)) from t;
我对.h和.c文件中的行感到困惑:
jsonb
在我看来,正在实例化名为with t(x,y,z) as (values(1,3,2),(5,2,3))
select *, j->>'f1' as val, j->>'f2' as fld
from t, to_jsonb(least((x,'x'::text),(y,'y'::text),(z,'z'::text))) as j;
的{{1}}类型的新结构,并将其设置为select ProdName, j->>'f1' as val, j->>'f2' as fld
from results, to_jsonb(least((d1,'d1'),(d2,'d2'),(d3,'d3'),...,(d10,'d10')));
。但是,该结构有四个公共成员。它们都被设置为#define BCM2708_PERI_BASE 0x20000000
#define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) // GPIO controller
// IO Access
struct bcm2835_peripheral {
unsigned long addr_p;
int mem_fd;
void *map;
volatile unsigned int *addr;
};
struct bcm2835_peripheral gpio = {GPIO_BASE};
extern struct bcm2835_peripheral gpio;
?
我只包含相关的.h和.c文件中的行。这些行按它们在原始文件中的顺序排列。