| Function report | 
| Source Code: lib\842\842_compress.c | Create Date:2022-07-28 06:57:19 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:add_template
Proto:static int add_template(struct sw842_param *p, u8 c)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct sw842_param * | p | |
| u8 | c | 
| 224 | b = 0 | 
| 226 | bool inv = false | 
| 228 | If c >= he max of the regular templates - not including the special templates Then Return -EINVAL | 
| 233 | ret = add_bits(p, t[4], additional bits of each op param ) | 
| 241 | Case & == OP_AMOUNT_8 | 
| 248 | Else inv = true | 
| 250 | Break | 
| 251 | Case & == OP_AMOUNT_4 | 
| 252 | If b == 2 && t[i] & OP_ACTION_DATA Then ret = add_bits(p, get_input_data(p, 2, 32), 32) | 
| 260 | Else inv = true | 
| 262 | Break | 
| 263 | Case & == OP_AMOUNT_2 | 
| 270 | Else inv = true | 
| 272 | Break | 
| 273 | Case & == OP_AMOUNT_0 | 
| 274 | inv = b != 8 || Not (t[i] & OP_ACTION_NOOP) | 
| 275 | Break | 
| 276 | Default | 
| 277 | inv = true | 
| 278 | Break | 
| 284 | If inv Then | 
| 287 | Return -EINVAL | 
| 293 | If b != 8 Then | 
| 296 | Return -EINVAL | 
| 299 | If sw842_template_counts Then atomic_inc( & template_count[t[4]]) | 
| 302 | Return 0 | 
| Name | Describe | 
|---|---|
| process_next | d the next template to use, and add it* the p->dataN fields must already be set for the current 8 byte block | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |