Example #1
0
  char buf1[768], buf2[1000], *q;

  parse_error_msg(ps, pigp, _("warning"), buf1);
  q = str_escape_fmt(buf2, buf1, sizeof(buf2));
  strcat(q, fmt);

  va_start(args, fmt);
  ps->warncount++;
  strcat(q, "\n");
  if (vfprintf(stderr, buf2, args) == EOF)
    ohshite(_("failed to write parsing warning"));
  va_end(args);
}

const struct namevalue booleaninfos[] = {
  NAMEVALUE_DEF("no",  false),
  NAMEVALUE_DEF("yes", true),
  { .name = NULL }
};

const struct namevalue priorityinfos[] = {
  NAMEVALUE_DEF("required",                      pri_required),
  NAMEVALUE_DEF("important",                     pri_important),
  NAMEVALUE_DEF("standard",                      pri_standard),
  NAMEVALUE_DEF("optional",                      pri_optional),
  NAMEVALUE_DEF("extra",                         pri_extra),
  NAMEVALUE_DEF("this is a bug - please report", pri_other),
  NAMEVALUE_DEF("unknown",                       pri_unknown),
  { .name = NULL }
};
Example #2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#include <config.h>
#include <compat.h>

#include <dpkg/dpkg-db.h>
#include <dpkg/namevalue.h>

const struct namevalue booleaninfos[] = {
	NAMEVALUE_DEF("no",			false),
	NAMEVALUE_DEF("yes",			true),
	{ .name = NULL }
};

const struct namevalue multiarchinfos[] = {
	NAMEVALUE_DEF("no",			PKG_MULTIARCH_NO),
	NAMEVALUE_DEF("same",			PKG_MULTIARCH_SAME),
	NAMEVALUE_DEF("allowed",		PKG_MULTIARCH_ALLOWED),
	NAMEVALUE_DEF("foreign",		PKG_MULTIARCH_FOREIGN),
	{ .name = NULL }
};

const struct namevalue priorityinfos[] = {
	NAMEVALUE_DEF("required",		PKG_PRIO_REQUIRED),
	NAMEVALUE_DEF("important",		PKG_PRIO_IMPORTANT),