1 Oct 03:24
вопрос по языку Си - порядок вычисления операндов
У нас в rpm есть такой код.
lib/depends.h:
108 typedef /*@abstract@*/ struct availableList_s {
109 /*@owned@*/ /*@null@*/ struct availablePackage * list; /*!< Set of packages. */
110 struct availableIndex index; /*!< Set of available items. */
111 int delta; /*!< Delta for pkg list reallocation. */
112 int size; /*!< No. of pkgs in list. */
113 int alloced; /*!< No. of pkgs allocated for list. */
114 int numDirs; /*!< No. of directories. */
115 /*@owned@*/ /*@null@*/ dirInfo dirs; /*!< Set of directories. */
116 } * availableList;
...
lib/depends.c:
213 static /*@exposed@*/ struct availablePackage *
214 alAddPackage(availableList al,
215 Header h, /*@null@*/ /*@dependent@*/ const void * key,
216 /*@null@*/ FD_t fd, /*@null@*/ rpmRelocation * relocs)
217 /*@modifies al, h @*/
218 {
219 HGE_t hge = (HGE_t)headerGetEntryMinMemory;
220 HFD_t hfd = headerFreeData;
221 rpmTagType dnt, bnt;
222 struct availablePackage * p;
223 rpmRelocation * r;
224 int i;
225 int_32 * dirIndexes;
226 const char ** dirNames;
227 int numDirs, dirNum;
(Continue reading)
RSS Feed