Overview
Comment: | Updated to print packages |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
654957c65509f97c65b189fc808abe2d |
User & Date: | rkeene on 2014-09-08 06:12:46 |
Other Links: | manifest | tags |
Context
2014-09-08
| ||
06:48 | More work towards reading package data check-in: e37bc482a9 user: rkeene tags: trunk | |
06:12 | Updated to print packages check-in: 654957c655 user: rkeene tags: trunk | |
04:34 | More work towards SQLite3 integration check-in: 76ac4557f6 user: rkeene tags: trunk | |
Changes
Modified appfs.c from [d2a493f839] to [0ffa90a2b2].
︙ | |||
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + + + + | APPFS_CPU_I386, APPFS_CPU_ARM } appfs_cpuArch_t; struct appfs_package { char name[128]; char version[64]; char sha1[41]; appfs_os_t os; appfs_cpuArch_t cpuArch; int isLatest; int counter; struct appfs_package *_next; }; static appfs_os_t appfs_convert_os_fromString(const char *os) { if (strcasecmp(os, "Linux") == 0) { return(APPFS_OS_LINUX); } |
︙ | |||
79 80 81 82 83 84 85 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | case APPFS_CPU_UNKNOWN: return("unknown"); } return("unknown"); } |
︙ | |||
103 104 105 106 107 108 109 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | if (strcasecmp(cpu, "noarch") == 0) { return(APPFS_CPU_ALL); } return(APPFS_CPU_UNKNOWN); } |
︙ | |||
143 144 145 146 147 148 149 150 151 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | retval = Tcl_EvalObjv(interp, objc, objv, 0); ckfree((void *) objv); return(retval); } int appfs_getindex_cb(void *_head, int columns, char **values, char **names) { struct appfs_package **head = _head, *obj; obj = (void *) ckalloc(sizeof(*obj)); snprintf(obj->name, sizeof(obj->name), "%s", values[0]); snprintf(obj->version, sizeof(obj->version), "%s", values[1]); snprintf(obj->sha1, sizeof(obj->sha1), "%s", values[2]); obj->os = appfs_convert_os_fromString(values[3]); obj->cpuArch = appfs_convert_cpuArch_fromString(values[4]); if (values[5][0] == '1') { obj->isLatest = 1; } else { obj->isLatest = 0; } if (*head == NULL) { obj->counter = 0; } else { obj->counter = (*head)->counter + 1; } obj->_next = *head; *head = obj; return(0); } static struct appfs_package *appfs_getindex(const char *hostname, int *package_count_p) { struct appfs_package *head = NULL; char *sql; |
︙ | |||
199 200 201 202 203 204 205 | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | - + + + + + + + + + + + - + - + | static int appfs_fuse_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi) { return(-ENOENT); } #ifdef APPFS_TEST_DRIVER static int appfs_test_driver(void) { |
︙ |