freebsd-dev/usr.sbin/pkg_manage/pkg_manage.h
1995-02-15 20:47:56 +00:00

63 lines
1.9 KiB
C

/*
* include file for pkg.c
*
*
* Copyright (c) 1995, Marc van Kempen
*
* All rights reserved.
*
* This software may be used, modified, copied, distributed, and
* sold, in both source and binary form provided that the above
* copyright and these terms are retained, verbatim, as the first
* lines of this file. Under no circumstances is the author
* responsible for the proper functioning of this software, nor does
* the author assume any responsibility for damages incurred with
* its use.
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/dirent.h>
#include <ncurses.h>
#include <dialog.h>
#ifndef TRUE
#define TRUE (1)
#endif
#ifndef FALSE
#define FALSE (0)
#endif
typedef struct {
int N; /* size of buf in bytes */
int Nitems; /* # of packages */
char *buf; /* buffer to hold package info */
char **name; /* array of char pointer to locations in buf */
char **comment; /* idem */
char **description; /* idem */
unsigned char **mnu; /* pointers to be used with dialog_menu() */
} PKG_info;
typedef struct DirList { /* structure to hold the directory entries */
char filename[MAXNAMLEN]; /* together with the stat-info per file */
struct stat filestatus; /* filename, or the name to which it points */
int link; /* is it a link ? */
char *linkname; /* the name of the file the link points to */
} DirList;
#define PKG_DELETE "/usr/sbin/pkg_delete"
#define PKG_INFO "/usr/sbin/pkg_info"
#define PKG_ADD "/usr/sbin/pkg_add"
#define TAR "/usr/bin/tar"
/* HELP_PATH must have a trailing '/' */
#ifndef HELP_PATH
#define HELP_PATH "/home/marc/src/pkg_manage/"
#endif
#define VIEW_INST_HLP HELP_PATH##"pkg_view-inst.hlp"
#define DEL_INST_HLP HELP_PATH##"pkg_del-inst.hlp"
#define PREVIEW_HLP HELP_PATH##"pkg_preview.hlp"
#define INSTALL_HLP HELP_PATH##"pkg_install.hlp"
#define MAIN_HLP HELP_PATH##"pkg_main.hlp"