1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2025-04-21 12:27:27 +03:00

qpkg: move "struct pkg" and its allocation from gobble.c and qpkg.h to pkg.[hc]

- Makefile (OBJS_qpkg): added pkg.o
- gobble.c (gobble_buf): moved "struct pkg" allocation to function new_pkg
  in pkg.c
- qpkg.h: moved "struct pkg" and subordinate structures to pkg.h
- pkg.h, pkg.c (new_pkg, free_pkg): provide package structure definition,
  allocation, and deallocation
- fixup.c, gobble.c, prereq.c, qpkg.c: include "pkg.h"
- gobble.c (finish_pkg): use free_pkg instead of just "free" to avoid
  leaking memory
This commit is contained in:
Werner Almesberger
2010-11-22 16:19:32 -03:00
parent 8d453d77c2
commit bbf9c42bc8
8 changed files with 127 additions and 49 deletions

View File

@@ -12,7 +12,7 @@
SHELL = /bin/bash
OBJS_qpkg = fixup.o gobble.o id.o prereq.o qpkg.o jrb.o
OBJS_qpkg = fixup.o gobble.o id.o pkg.o prereq.o qpkg.o jrb.o
OBJS_rbtest = rbtest.o jrb.o
OBJS = $(OBJS_qpkg) $(OBJS_rbtest)