1995-04-21 10:05:46 +00:00
|
|
|
/***************************************************************
|
1995-05-30 03:57:47 +00:00
|
|
|
*
|
1995-04-21 10:05:46 +00:00
|
|
|
* Program: pkg_main.c
|
|
|
|
* Author: Marc van Kempen
|
|
|
|
* Desc: main routine for pkg_manage
|
|
|
|
*
|
|
|
|
* 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.
|
1995-05-30 03:57:47 +00:00
|
|
|
*
|
1995-04-21 10:05:46 +00:00
|
|
|
***************************************************************/
|
|
|
|
|
|
|
|
#include "pkg_manage.h"
|
|
|
|
#include "ui_objects.h"
|
|
|
|
|
|
|
|
extern PKG_info p_inf;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Main
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
1995-05-24 06:20:08 +00:00
|
|
|
main(int argc, char **argv)
|
1995-04-21 10:05:46 +00:00
|
|
|
{
|
|
|
|
init_dialog();
|
|
|
|
|
|
|
|
p_inf.Nitems = 0; /* Initialize p_inf */
|
1995-06-11 19:33:05 +00:00
|
|
|
|
1995-04-21 10:05:46 +00:00
|
|
|
get_pkginfo();
|
1995-06-11 19:33:05 +00:00
|
|
|
|
|
|
|
/* start in the pkg add menu when giving the -add option */
|
|
|
|
if (argc > 1) {
|
|
|
|
if (strcmp(argv[1], "-add") == 0) {
|
|
|
|
install_pkgs_indir();
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
run_menu();
|
|
|
|
}
|
1995-04-21 10:05:46 +00:00
|
|
|
|
|
|
|
if (p_inf.Nitems > 0) {
|
|
|
|
FreeInfo();
|
|
|
|
}
|
1995-05-30 03:57:47 +00:00
|
|
|
|
1995-04-21 10:05:46 +00:00
|
|
|
clear();
|
|
|
|
dialog_update();
|
|
|
|
end_dialog();
|
|
|
|
|
|
|
|
return;
|
|
|
|
} /* main() */
|