2002-02-24 Robert Collins * log.cc (log_save): Fix creating /var/log. * packate_meta.cc (standard_dirs): Remove duplicate '/''s. 2002-02-24 Gary R. Van Sickle * res.rc (STRINGTABLE): Add IDS_CYGWIN_SETUP and IDS_CYGWIN_SETUP_WITH_PROGRESS strings. * resource.h: Add IDS_CYGWIN_SETUP and IDS_CYGWIN_SETUP_WITH_PROGRESS IDs. * splash.cc (OnInit): Qualify SetWindowText() call with global scope operator (::SetWindowText()). * threebar.cc: Run indent. (cistring.h): Add include. (SetText1, SetText2, SetText3): Qualify SetWindowText() call with global scope operator. (SetBar2): Add logic for writing percent complete into window title. * window.h: Run indent. (SetWindowText): New function. (String): Add forward declaration. * window.cc: Run indent. (String++.h): Add include. (SetWindowText): New function. 2002-02-24 Robert Collins * README: Update TODO list. * install.cc (install_one): Fix src package location. (do_install_thread): Fix creating directories. 2002-02-19 Robert Collins * choose.cc: Include cygpackage.h for scan2 use. (set_existence): Ignore setup.ini mirrors when installing from cwd. (scan2): Process any valid file. Add cache entries when a file matching a setup.ini listed version is found. * filemanip.cc (parse_filename): Remove pkgtar - not used anywhere else. * filemanip.h (filemanip::pkgtar): Remove. * package_meta.cc (CategoryPackage::~CategoryPackage): New method. (packagemeta::~packagemeta): Move from package_meta.h Remove and delete all version and category information. * package_meta.h (CategoryPackage): Create a destructor. (packagemeta::~packagemeta): Move to .cc file. 2002-02-19 Robert Collins * install.cc (install_one_source): Make NULL cached package names cause errors. 2002-02-18 Michael A Chase * desktop.cc (make_passwd_group): Don't create passwd-grp.bat unnecessarily. 2002-02-18 Michael A Chase * log.cc (log_save): Put "\n" at end of log lines instead of "'". 2002-02-19 Robert Collins * mount.cc (create_mount): Avoid a const char*->char* warning. (read_mounts): Ditto. 2002-02-05 Jason Tishler * download.cc (do_download_thread): Fix off-by-one error. 2002-02-19 Robert Collins * configure.in (CXXFLAGS): Substitute at configure time, not runtime. * configure (CXXFLAGS): Regenerate. * Makefile.in (iniparse.o): Build via default rules - no errors now. * README: TODO list updates. 2002-02-19 Michael A Chase * String++.cc (String::concat):: Remove. (String::vconcat):: Ditto. * String++.h (String::concat):: Remove. (String::vconcat):: Ditto. * archive_tar.cc: Don't include concat.h. * archive_tar_file.cc: Don't include concat.h. * compress_bz.cc (compress_bz::peek): Don't log unneeded messages. (compress_bz::seek): Ditto. (compress_bz::~compress_bz): Ditto. * compress_gz.cc (compress_gz::peek): Ditto. (compress_gz::error): Ditto. (compress_gz::~compress_gz): Ditto. * concat.cc (vconcat): Remove. (concat): Ditto. * concat.h (vconcat): Remove. (concat): Ditto. * desktop.cc (desktop_icon): Use new cygpath. (make_etc_profile): Ditto. (uexists): Ditto. (make_passwd_group): Ditto. (save_icon): Ditto. (check_desktop): Remove concat use. (check_start_menu): Ditto. * download.cc (download_one): Use new mkpath_p correctly. Use LOG_PLAIN. * fromcwd.cc: Don't include concat.h. * geturl.cc (get_url_to_membuf): Use String log() call. (get_url_to_file): Ditto. * install.cc: Don't include concat.h. (uninstall_one): Use LOG_PLAIN. (replace_one): Ditto. (install_one_source): Ditto. (install_one): More char to String conversion. (do_install_thread): Use new cygpath. Use new create_mount. * io_stream.cc (io_stream::move): Use new log(). * io_stream_cygfile (io_stream_cygfile::io_stream_cygfile): Use new cygpath. (io_stream_cygfile::exists): Ditto. (io_stream_cygfile::remove): Ditto. (io_stream_cygfile::mklink): Ditto. (io_stream_cygfile::write): Ditto. (cygmkdir_p): Ditto. (io_stream_cygfile::move): Ditto. * io_stream_file.cc: Don't include log.h. (io_stream_file::write): Don't log unneeded messages. * localdir.cc: Don't include concat.h. (LocalDirPage::OnNext): Use LOG_PLAIN. * log.cc: Don't include log.h. (exit_setup): Use new cygpath. * log.h (log_level): Add new level LOG_PLAIN. * main.cc (WinMain): Use new log(). * mount.cc (SLASH_P): New macro from concat.h. (cygpath): Make String version globally visible. Remove varargs version. * mount,h: Ditto. * msg.cc (mbox): Use LOG_PLAIN. * net.cc (NetPage::OnNext): Ditto. * nio-ftp.cc (ftp_line): Use new log(). * nio-http.cc: Don't include log.h. (retry_get): Use alternative url variable. * package_db.cc: Don't include concat.h. (packagedb::flush): Don't use concat. * package_meta.cc: Don't include concat.h. (packagemeta::uninstall): Use new cygpath. * postinstall.cc (do_postinstall): Ditto. * root.cc (RootPage::OnNext): Use LOG_PLAIN. * script.cc: Don't include concat.h. (init_run_script): Use new cygpath. (run_script): More char * to String conversion. (try_run_script): Ditto. * site.cc: Don't include concat.h. (SitePage::OnNext): Use LOG_PLAIN. (SitePage::OnMessageCmd): Use new log(). * source.cc (SourcePage::OnDeactivate): Use LOG_PLAIN. 2002-02-19 Robert Collins * Makefile.in (OBJS): Add new object. * PickCategoryLine.cc (PickCategoryLine::paint): Print a "+" before the name. * PickCategoryLine.h (PickCategoryLine::bucket): Use the String class. * PickLine.h (Pickline::key): Change to a String to help plug leaks. (PickLine::Pickline): Accept a String for the key. * PickPackageLine.cc (PickPackageLine::paint): Convert all char use to Strings. * PickPackageLine.h (PickPackageLine::PickPackageLine): The key is automatically initialisednow. * PickView.cc (PickView::note_width): Convert all char * use to Strings. (PickView::init_header): Move category length checking out of the inner loop for efficiency. Convert all char use to Strings. * PickView.h: Include the String++ header. (PickView::note_width): Update the prototype. * String++.cc: New file, implements a reference counting string class. * String++.h: New file, declares a reference counting string class. * archive.cc: Include String++ instead of concat. (archive::extract_file): Convert char * usage to Strings. * archive.h: Inlude the String++ header. (archive::extract_file): Update prototype. (archive::next_file_name): Convert to a String. (archive::linktarget): Ditto. * archive_tar.cc (archive_tar::next_file_name): Convert to String usage. (archive_tar::linktarget): Ditto. * arhive_tar.h: Update the copyright. Explicitly include the relevant headers. (tar_map_result_type): Convert to String usage. (archive_tar::next_file_name): Update prototype. (archive_tar::linktarget): Ditto. * category.cc (Category::Category): Update initialisers. Convert to String usage. (Categorycmp): Update to String usage. * category.h: Include the String++ header. (Category::Category): Update to String usage. (Category::name): Ditto. (Category::key): Ditto. * choose.cc: Remove concat.h, it's not needed. (scan2): Update to String usage. (do_choose): Ditto. * cygpackage.cc: Update includes for use of String class. (cygpackage::cygpackage): Update for String usage. (cygpackage::set_canonical_version): Ditto. (cygpackage::destroy): Ditto. (cygpackage::getfirstfile): Ditto. (cygpackage::getnextfile): Ditto. (cygpackage::Name): Ditto. (cygpackage::Vendor_version): Ditto. (cygpackage::Package_version): Ditto. (cygpackage::Canonical_version): Ditto. (cygpackage::set_sdesc): Ditto. (cygpackage::set_ldesc): Ditto. * cygpackage.h: Include String++.h for parsing this file. (cygpackage::cygpackage): Update for String usage. (cygpackage::set_canonical_version): Ditto. (cygpackage::destroy): Ditto. (cygpackage::getfirstfile): Ditto. (cygpackage::getnextfile): Ditto. (cygpackage::Name): Ditto. (cygpackage::Vendor_version): Ditto. (cygpackage::Package_version): Ditto. (cygpackage::Canonical_version): Ditto. (cygpackage::set_sdesc): Ditto. (cygpackage::set_ldesc): Ditto. (cygpackage::name): Ditto. (cygpackage::vendor): Ditto. (cygpackage::packagev): Ditto. (cygpackage::canonical): Ditto. (cygpackage::fn): Ditto. (cygpackage::sdesc): Ditto. (cygpackage::ldesc): Ditto. * desktop.cc: Update includes for use of String class. (batname): Update for String usage. (iconname): Ditto. (make_link): Ditto. (start)menu): Ditto. (desktop_icon): Ditto. (make_cygwin_bat): Ditto. (make_etc_profile): Ditto. (uexists): Ditto. (make_passwd_group): Ditto. (save_icon): Ditto. (check_desktop): Ditto. (check_startmenu): Ditto. * dialog.cc (eget): Update for String usage. (egetString): New function. (eset): New variant for Strings. * dialog.h: Include String++.h for parsing this file. (egetString): New function. (eset): New variant for Strings. * diskfull.cc (diskfull): Update for String usage. * diskfull.h: Include String++.h for parsing this file. (diskfull): Update for String usage. * download.cc: Update includes for use of String class. (check_for_cached): Update for String usage. (download_one): Ditto. * filemanip.cc (get_file_size): Ditto. (base): Ditto. (parse_filename): Ditto. (backslash): Ditto. * filemanip.h: Include String++.h for parsing this file. (fileparse): Update for String usage. (base): Ditto. (parse_filename): Ditto. Don't consider '_' to be a separator. (backslash): Ditto. * find.cc: Update includes for use of String class. (find_sub): Make more flexible. (find): Update for String usage. * find.h (find): Use Strings. * fromcwd.cc (found_file): Update for String usage. * geturl.cc: Ditto. (init_dialog): Ditto. (get_url_to_membuf): Ditto. (get_url_to_string): Ditto. (get_url_to_file): Ditto. * geturl.h: Ditto. (get_url_to_membuf): Ditto. (get_url_to_string): Ditto. (get_url_to_file): Ditto. * hash.h: Ditto. (add_subdirs): Ditto. * ini.cc: Update includes for String usage. (find_routine): Update for String usage. (do_remote_ini): Ditto. (do_ini_thread): Ditto. * ini.h (ini_init): Ditto. * inilex.l: Update includes for String usage. (ini_init): Update for String usage. * iniparse.y: Ditto. (add_correct_version): Ditto. * install.cc: Update includes for String usage. (install_one_source): Update for String usage. (uninstall_one): Ditto. (replace_one): Ditto. (install_one_source): Ditto. (do_install_thread): Ditto. * io_stream.cc: Update includes for String usage. (io_stream::open): Update for String usage. (io_stream::mkpath_p): Ditto. (io_stream::remove): Ditto. (io_stream::mklink): Ditto. (io_stream::move_copy): Ditto. (io_stream::move): Ditto. (io_stream::exists): Ditto. * io_stream.h: Update includes to allow correct parsing. (io_stream::open): Update for String usage. (io_stream::mkpath_p): Ditto. (io_stream::remove): Ditto. (io_stream::mklink): Ditto. (io_stream::move_copy): Ditto. (io_stream::move): Ditto. (io_stream::exists): Ditto. * io_stream_cygfile.cc: Update includes for String usage. (get_root_dir_now): Update for String usage. (io_stream_cygfile::io_stream_cygfile): Ditto. (io_stream_cygfile::~io_stream_cygfile): Ditto. (io_stream_cygfile::exists): Ditto. (io_stream_cygfile::remove): Ditto. (io_stream_cygfile::mklink): Ditto. (cygmkdir_p): Ditto. (io_stream_cygfile::set_mtime): Ditto. (io_stream_cygfile::move): Ditto. (io_stream_cygfile::get_size): Ditto. * io_stream_cygfile.h: Update includes for String usage. (io_stream_cygfile::io_stream_cygfile): Update for String usage. (io_stream_cygfile::~io_stream_cygfile): Ditto. (io_stream_cygfile::exists): Ditto. (io_stream_cygfile::remove): Ditto. (io_stream_cygfile::mklink): Ditto. (cygmkdir_p): Ditto. (io_stream_cygfile::set_mtime): Ditto. (io_stream_cygfile::move): Ditto. (io_stream_cygfile::get_size): Ditto. (io_stream_cygfile::fname): Ditto. (io_stream_cygfile::lmode): Ditto. * io_stream_file.cc: Update includes for String usage. (io_stream_file::io_stream_file): Update for String usage. (io_stream_file::~io_stream_file): Ditto. (io_stream_file::exists): Ditto. (io_stream_file::remove): Ditto. (io_stream_file::mklink): Ditto. (io_stream_file::set_mtime): Ditto. (io_stream_file::move): Ditto. (io_stream_file::get_size): Ditto. * io_stream_file.h: Update includes for String usage. * io_stream_file.cc: Update includes for String usage. (io_stream_file::io_stream_file): Update for String usage. (io_stream_file::~io_stream_file): Ditto. (io_stream_file::exists): Ditto. (io_stream_file::remove): Ditto. (io_stream_file::mklink): Ditto. (io_stream_file::set_mtime): Ditto. (io_stream_file::move): Ditto. (io_stream_file::get_size): Ditto. (io_stream_file::fname): Ditto. (io_stream_file::lmode): Ditto. * localdir.cc: Update includes for String usage. (save_local_dir): Update for String usage. (check_if_enable_next): Ditto. (load_dialog): Ditto. (browse_cb): Ditto. (LocalDirPage::OnInit): Ditto. (LocalDirPage::OnNext): Ditto. * log.cc: Update includes for String usage. (struct LogEnt): Update for String usage. (log): Ditto. (log_save): Ditto. (exit_setup): Ditto. * log.h: Update includes for String usage. (log_level): Update for String usage. (log): Ditto. (log_save): Ditto. * main.cc (WinMain): Update for String usage. * mklink2.c (make_link_2): Update for String usage. * mklink2.h (make_link_2): Update for String usage. * mount.cc: Update includes for String usage. (mount_table): Update for String usage. (find2): Ditto. (create_mount): Ditto. (remove1): Ditto. (remove_mount): Ditto. (read_mounts): Ditto. (set_root_dir): Ditto. (get_root_dir): Ditto. (path_prefix_p): Ditto. (cygpath): Ditto. * mount.h: Update includes for String usage. (create_mount): Update for String usage. (remove_mount): Ditto. (cygpath): Ditto. (set_root_dir): Ditto. (get_root_dir): Ditto. * msg.cc (mbox): Ditto. * net.cc (NetPage::OnNext): Ditto. * package_db.cc (packagedb::flush): Ditto. (packagedb::packages): Ditto. (packagedb::categories): Ditto. * package_db.h: Update includes for String usage. (packagedb::packages): Update for String usage. (packagedb::categories): Ditto. * package_meta.cc: Update includes for String usage. (hash::add_subdirs): Update for String usage. (packagemeta::uninstall): Ditto. (packagemeta::SDesc): Ditto. (packagemeta::action_caption): Ditto. * package_meta.h: Update includes for String usage. (packagemeta::packagemeta): Update for String usage. (packagemeta::~packagemeta): Ditto. (packagemeta::uninstall): Ditto. (packagemeta::SDesc): Ditto. (packagemeta::action_caption): Ditto. (package_source.cc site::site): Ditto. (packagesource::set_canonical): Ditto. (packagesource::set_cached): Ditto. * package_source.h: Update includes for String usage. (site::site): Update for String usage. (packagesource::set_canonical): Ditto. (packagesource::set_cached): Ditto. (packagesource::packagesource): Ditto. (packagesource::sites): Ditto. (packagesource::cached): Ditto. * package_version.h: Update includes for String usage. (Dependency): Update for String usage. (packageversion): Ditto. * postinstall.cc: Update includes for String usage. (do_postinstall): Update for String usage. * res.rc (IDD_LOCAL_DIR): Fix typo again! * rfc1738.cc (rfc1738_escape_part): Update for String usage. * rfc1738.h: Update includes for String usage. (rfc1738_escape_part): Update for String usage. * root.cc: Update includes for String usage. (check_if_enable_next): Update for String usage. (save_dialog): Ditto. (browse_cb): Ditto. (directory_is_absolute): Ditto. (directory_is_rootdir): Ditto. (directory_has_spaces): Ditto. (RootPage::OnInit): Ditto. (RootPage::OnNext): Ditto. * script.cc: Update includes for String usage. (init_run_script): Update for String usage. (run): Ditto. (run_script): Ditto. (try_run_script): Ditto. * script.h: Update includes for String usage. (run_script): Update for String usage. (try_run_script): Ditto. * site.cc site_list): Ditto. (all_site_list): Ditto. (other_url): Eliminate. (site_list_type::init): Update for String usage. (site_list_type::site_list_type): Ditto. (get_site_list): Ditto. (get_saved_sites): Ditto. (do_download_site_info_thread): Ditto. (SitePage::OnNext): Ditto. (SitePage::OnActivate): Ditto. (SitePage::PopulateListBox): Ditto. (SitePage::OnMessageCmd): Handle empty url's. * site.h: Update includes for String usage. (site_list_type::site_list_type): Update for String usage. (site_list_type::init): Ditto. (site_list_type::~site_list_type): Ditto. (site_list_type::url): Ditto. (site_list_type::displayed_url): Ditto. (site_list_type::key): Ditto. * source.cc (SourcePage::OnDeactivate): Ditto. * state.h: Update includes for String usage. (local_dir): Update for String usage. (trust_level): Remove. * version.cc: Update includes for String usage. (canonicalize_version): Update for String usage. * version.h: Update includes for String usage. (canonicalize_version): Update for String usage. 2002-02-15 Christopher Faylor * filemanip.c (parse_filename): Revert previous change. 2002-02-14 Christopher Faylor * filemanip.c (parse_filename): Don't treat '_' as a version number introducer. 2002-01-29 Christopher Faylor * configure: Regenerate. 2002-01-27 Robert Collins * res.rc (IDD_LOCAL_DIR): Fix typo reported by Rene 2002-01-27 Robert Collins * README: Update Todo's. * list.h: Run indent. (list): New methods checksize and insert to reduce code duplication. (list::registerbykey): Use them. (list::registerbyobject): Ditto. (list::removebyindex): Copy each object individually - safe for non trivial objects. (list::checksize): Implement. (list::insert): Implement. 2002-01-27 Robert Collins * Makefile.in: Remove the dlmalloc object by default. * install.cc (do_install_thread): Remove the mallinfo call for 'working around' the crashing issue. * package_db.h: Include - it's needed to parse this. * package_source.cc (site::site): Move here from the header file. * package_source.h (site): Stop the constructor being inlinable. 2002-01-26 Robert Collins * filemanip.cc (find_tar_ext): Add a descriptive comment. 2002-01-25 Michael A Chase * filemanip.cc (find_tar_ext): Clean up tests for .tar.gz and .tar. * fromcwd.cc (do_fromcwd): Expand FIXME comment in source file check. * install.cc (install_one_source): Add space between words in log() call. 2002-01-22 Robert Collins * log.cc (exit_setup): When saving to the download dir, explicity specify the path. 2002-01-22 Robert Collins * archive.cc (extract_file): Separate out the prefix and the URL scheme. * archive.h (archive::extract_file): Ditto. * install.cc (install_one_source): Ditto. Use the new archive::extract_file syntax. (replace_one): Use the new syntax. (io_stream.cc): Add some log info for links. 2002-01-22 Robert Collins * PickCategoryLine.cc (PickCategoryLine::actiontext): Remove. (PickCategoryLine::paint): Use the new action method. (PickCategoryLine::click): Set the action for all children. (PickCategoryLine::set_action): New method. * PickCategoryLine.h (PickCategoryLine::-actions): Remove. (PickCategoryLine::current_default): Use packagemeta _actions class. * PickLine.h (PickLine::set_action): New abstract method that requires including package_meta.h. * PickPackageLine.cc (PickPackageLine::set_action): New method. * PickPackageLine.h (PickPackageLine::set_action): Declare this. * list.h (getbykey): A const correctness fix. * package_meta.cc: Run indent. (packagemeta::Default_action): New const. (packagemeta::Install_action): Ditto. (packagemeta::Reinstall_action): Ditto. (packagemeta::Uninstall_action): Ditto. (packagemeta::_actions::caption): New method. (packagemeta::_actions::operator++): Ditto. (packagemeta::set_action): New overload. * package_meta.h (packagemeta::_actions): New class. (packagemeta::set_action): Declare this. 2002-01-22 Robert Collins * Makefile.in (OBJS): Remove supp.o - it appears accidental. * choose.cc: Don't define alloca anymore, it's done in win32.h 2002-01-22 Robert Collins * PickPackageLine.cc: New file. * PickPackageLine.h: New file. * PickLine.cc: New file. * PickLine.h: New file. * PickCategoryLine.cc: New file. * PickCategoryLine.h: New file. * PickView.cc: New file. * PickView.h: New file. * Makefile.in: Add new objects to setup.exe. Backout -fno-exceptions option. * choose.cc: Include PickView.h. Remove view related defines and static variables. (_pkg_headers): Moved to PickView.cc. (_cat_headers): Ditto. (view::views::Unknown): Ditto. (view::views::PackageFull): (view::views::Package): (view::views::Category): (pkgtrustp): Moved to package_meta.cc. (add_required): Moved to package_meta.cc. (pick_category_line::empty): Moved to PickCategoryLine.cc (paint): Adjust for moved static variables. (view::scroll): Moved to PickView.cc. (list_vscroll): Adjust for moved static variables. (list_hscroll): Ditto. (list_click): Ditto. (note_width): Moved to PickView.cc. (view::view): Ditto. (view::set_view_mode): Ditto. (view::mode_caption): Ditto. (view::views::caption): Ditto. (view::set_headers): Ditto. (DoInsertItem): Ditto. (view::init_headers): Ditto. (view::insert_pkg): Ditto. (view::insert_category): Ditto. (view::clear_view): Ditto. (view::views::operator++): Ditto. (view::click): Ditto. (default_trust): Adjust for moved statics. (pick_pkg_line::paint): Moved to PickPackageLine.cc. (pick_pkg_line::click): Ditto. (pick_category_line::actiontext): Moved to PickCategoryLine.cc (pick_category_line::paint): Ditto. (pick_category_line::click): Ditto. (set_view_mode): Adjust for moved statics. (create_listview): Ditto. * choose.h: Remove Category and packagemeta forward defines - not needed. Don't include unneeded headers list and package_meta. (_header): Move to PickView.h. (pick_line): Move to PickLine.h. (pick_pkg_line): Move to PickPackageLine.h. (pick_category_line): Move to PickCategoryLine.h. (view): Move to PickView.h. * ini.h (trusts): Move to package_meta.h. * package_meta.h (trusts): New enum. (packagemeta::set_requirements): New helper method. (packagemeta::trustp): Ditto. 2002-01-21 Christopher Faylor * choose.h (view): Move forward declaration of views into public area or g++ v3 will complain. 2002-01-21 Christopher Faylor * Makefile.in (CXXFLAGS): Add -fno-exceptions. * win32.h (alloca): Define as __builtin_alloca. * io_stream_memory.cc: Add include file. 2002-01-21 Robert Collins * archive_tar.cc (archive_tar::~archive_tar): Mark the stream as destroyed. * archive_tar_file.cc (archive_tar_file::~archive_tar_file): Ditto. * compress.cc (compress::~compress): Be less verbose. * compress_bz.cc (compress_bz::~compress_bz): Ditto. Mark the stream as destroyed. * compress_gz.cc (compress_gz::~compress_gz): Mark the stream as destroyed. * io_stream.cc (io_stream::~io_stream): Only warn when the stream is not marked as destroyed. * io_stream_cygfile.cc (io_stream_cygfile::~io_stream_cygfile): Mark the stream as destroyed. * io_stream_file.cc (io_stream_file::~io_stream_file): Ditto. * io_stream_memory.cc (io_stream_memory::~io_stream_memory): Ditto. 2002-01-21 Robert Collins * Makefile.in (CFLAGS): Allow customisable malloc debug flags. (OBJS): Link in malloc objects. * category.cc (category): Use new char, not strdup. * choose.cc (pick_pkg_line::paint): Allow for the regionsize to shrink. (do_choose): Use new char, not malloc. * concat.cc (vconcat): Ditto. * cygpackage.cc (cygpackage): Use new char, not strdup. (set_canonical_version): Ditto. (cygpackage::destroy): Use delete[], not free. * desktop.cc (uexists): Ditto. * dialog.cc (egest): Use new char, not strdup. * dlmalloc.c: New file - Doug Lea's malloc 2.7.0 * hash.cc (hash::hash): Use delete instead of free. (hash::add): Use new char, not strdup. * ini.cc (do_remote_ini): Use delete[] not free. * inilex.l: Use new char, not strdup. (ini_init): Ditto. * iniparse.y: Ditto. Use a local package_db rather than a static one. * install.cc (struct mallinfo): Workaround an apparent dlmalloc bug. (do_install_thread): Call mallinfo to force a consistency check. Appears to fix a 'inuse' error in -DDEBUG builds. Use delete[] for strings. * io_stream_cygfile.cc (io_stream_cygfile::io_stream_cygfile): Use new char, not strdup. (io_stream_cygfile::~io_stream_cygfile): Use delete[], not free. (io_stream_cygfile::remove): Use new char, not strdup. * io_stream_file.cc (io_stream_file::io_stream_file): Use new char, not strdup. (io_stream_file::io_stream_file): Use delete[], not free. (io_stream_file::remove): Use new char, not strdup. * io_stream_memory.cc (memblock::~memblock): Use delete[], not free. * io_stream_memory.h (memblock): Use new char, not malloc. * localdir.cc (LocalDirPage::OnInit): Use new char, not strdup. * main.cc (WinMain): Use new char, not strdup. * mount.cc (find2): Use new char, not malloc. (read_mounts): Ditto. (cygpath): Use new char, not strdup. * netio.cc (NetIO::~NetIO): Use delete[], not free. (NetIO::set_url): Use new char, not strdup. (NetIO::get_ftp_auth): Use delete[], not free. * nio-ftp.cc (NetIO_FTP::NetIO_FTP): Ditto. Use new char instead of strdup. * nio-http.cc (base64_encode): Use new char, not malloc. * package_meta.cc (hash::add_subdirs): Use new char instead of strdup. * package_source.h (~ packagesource): Use delete[] instead of delete. * port.h (strdup): Deprecate the use of strdup. * rfc1738.cc (rfc1738_do_escape): Use new char, not calloc. * script.cc (init_run_script): Us delete[], not free. (run_script): Ditto. * simpsock.cc (SimpleSocket::fill): Use new char, not malloc. (SimpleSocket::invalidate): Use delete[], not free. * site.cc (site_list_type::init): Use new char instead of strdup. * site.h (~site_list_type): Use delete[], not free. 2002-01-20 Robert Collins * Makefile.in (OBJS): Add win32.o - win32 support functions. * README: Update todos. * archive.cc (extract_file): Support a suffix for appending to extracted files. * archive.h: Ditto. * choose.cc (set_view_mode): Use the new view::views class. (view::views::Unknown): New static for defaulting view::views variables. (view::views::PackageFull): New static for the current view. (view::views::Package): Ditto. (view::views::Category): Ditto. (topbucket::paint): Remove. (topbucket::empty): Rename to pick_category_line::empty. (topbucket::~topbucket): Remove. (paint): Use the new view::views class. Don't paint 'all' as a category when showing package categoies. (pick_category_line::actiontext): New method. (pick_category_line::paint): Make showing the category optional, and show the 'category action'. (pick_category_line::click): Make showing the category optional, and differentiate between the name being clicked, and the action description. (view::view): Use the new view::views class. (view::set_view_mode): Ditto. (view::mode_caption): Ditto. (view::views::caption): New method. (view::set_headers): Use the new view::views class. (view::clear_view): Ditto. (viewsplusplus): Replaced by (view::views::operator++): New operator. (set_view_mode): Use the new view::views class. (create_listview): Ditto. (dialog_cmd): Ditto. * choose.h (actions): Remove. (views): Remove. (pick_line): Add a new convenience constructor. (top_bucket): Remove. (pick_category_line): Reparent under pick_line, and adsorb top_bucket. (view::views): New class. * ini.h: Don't include choose.h (is_download_action): Remove. (is_upgrade_action): Remove. (is_uninstall_action): Remove. (is_full_action): Remove. * install.cc (num_replacements): New static. (rebootneeded): Ditto. (replace_one): Handle upgrades separate from removal or new installs. (install_one_source): Handle in use files. (install_one): Don't repeat upgrades. (do_install_thread): Initialize new statics. Order actions as uninstall, replace, install. Warn about rebooting if needed. * res.rc (IDS_REBOOT_REQUIRED): New string. * resource.h (IDS_REBOOT_REQUIRED): Give value. * win32.h: Declare class Win32, and update copyright and intent message. * win32.cc: New file. 2002-01-15 Corinna Vinschen * io_stream.cc (io_stream::gets): Eliminate trailing new line chars. * package_meta.cc (packagemeta::uninstall): Check for additional Windows shortcut. Unset R/O file attribute before trying to delete file. 2002-01-09 Robert Collins * choose.cc (pkgtrustp): Fall back to installed if a package is not present in the current trust level. For prev, fall back via curr. (set_existence): Allow sources with no sites, but cached files to be kept. (pick_category_line::paint): Start drawing clickable categories. * fromcwd.cc (found_file): Reinstate local file scanning. 2002-01-07 Gary R. Van Sickle * fromcwd.cc: Run indent. (do_fromcwd): Reverse sense of comment. Set next_dialog to IDD_CHOOSER instead of IDD_CHOOSE. * ini.cc (find_routine): Remove "/" from "/setup.ini". 2001-01-07 Robert Collins * category.cc (Categorycmp): Add a const safe version. * category.h (Categorycmp): Add a const safe version. (Category): Add operator ==. * choose.cc (fill_missing_category): Add every package to "All". (pick_category_line::paint): Add support for hidden labels, and a tree depth. (pick_category_line::click): Ditto. (view::view): Pass in a top level category to use. (view::insert_pkg): Special case - skip category "All". (view::insert_category): Ditto. (view::clear_view): Set the contents label state. (create_listview): Pass in a top level category to view(). * choose.h (topbucket): Make bucket available to derived classes. (pick_category_line): Add support for hidden labels, and a tree depth. Remove our second copy of bucket. (view): Pass in a top level category to the constructor. Use pick_category_line to allow three level display. 2001-01-06 Robert Collins * cygpackage.h (cygpackage): Make set_[s|l]desc virtual. * iniparse.y (add_correct_version): Copy descriptions across. * package_meta.cc (SDesc): Iterate through versions, return the first with a description. * package_version.h (packageversion): Add new virtuals set_[l|s]desc. 2001-01-04 Robert Collins * script.cc (run_script): Change cygpath:// to cygfile://. * install.cc (do_install_thread): Fix off-by-one errors. 2001-01-04 Robert Collins * package_db.cc (packagedb::flush): Fix an off-by-one error. 2002-01-04 Jan Nieuwenhuizen * Makefile.in (realclean): more clean. (OBJS): Add script.o. * postinstall.cc (run_script_in_etc_postinstall): New function. (do_postinstall): Split off new funtion init_run_script (). (init_run_script): (run): (run_script): Move to script.cc. Replace some deprecated remove and move calls. * script.h: * script.cc: New file. * Forward port cygwin-20010707.jcn3.patch. * package_meta.cc (uninstall): Run pre- and postremove scripts. * install.cc: Typo fix. (do_install): Run script initialisation. 2001-01-04 Gary R. Van Sickle * cistring.cc: Run d2u. * cistring.h: Run d2u. * desktop.cc (etc_profile): Remove "test -f ./.bashrc && . ./.bashrc" from the generated /etc/profile. Bash will source this file automatically, and having this here merely results in .bashrc being executed twice. Run d2u. * desktop.h: Run d2u. * propsheet.cc: Run d2u. (PropSheetProc): New function. Add minimize box here instead of in PropertyPage::DialogProc. (PropSheet::Create): Change to use creation callback PropSheetProc. (DLGTEMPLATEEX): Add 'hidden' Windows struct definition. * propsheet.h: Run indent, d2u. * proppage.h: Run indent, d2u. * proppage.cc: Run d2u. (PropertyPage::DialogProc): Remove minimize-box-adding functionality. Remove commented-out "PropSheet_SetWizButtons" calls. Add support for calling virtual OnMessageCmd. Add setting of fonts in WM_INITDIALOG handler. (resource.h): New include for resource IDs. * res.rc: Resize and rearrange property page dialog templates to bring them in line with "Microsoft's Backward Compatible Wizard 97" specification. Run d2u. (IDD_SITE): Add an edit control and an "Add" button in order to combine the IDD_SITE and IDD_OTHER_URL functionality onto one page. (IDD_OTHER_URL): Remove dialog template. (IDD_DLSTATUS): Remove dialog template. * site.cc: Run d2u. (SitePage::OnBack): Remove NEXT() macro invocation. (SitePage::OnActivate): New member function. (load_dialog): Remove. Functionality subsumed into SitePage::OnActivate. (save_dialog): Change to support both list and user URLs. Remove OTHER_IDX and mirror_idx logic. (SitePage::PopulateListBox): New member function. (SitePage::CheckControlsAndDisableAccordingly): New member function. (SitePage::OnMessageCmd): New override. (check_if_enable_next): Remove. (dialog_cmd): Remove. (do_download_site_info_thread): Remove calls to NEXT() macro. (SitePage::Create): Call the single-param PropertyPage::Create overload. (other_url): New static taken from other.cc. (SitePage::OnNext): Remove mirror_idx logic. (SitePage::OnInit): Remove "Other URL" entry from list box. Remove list box populating code, now handled in SitePage::PopulateListBox. (mirror_idx, NO_IDX, OTHER_IDX): Remove. (save_site_url): Fix potential buffer overflow problem. Switched to TCHAR in grossly premature preparation for multilingual support. * site.h: Run d2u. (SitePage::OnActivate): New member function. (SitePage::CheckControlsAndDisableAccordingly) New member. (SitePage::OnMessageCmd): New override. (do_download_site_info_thread): Add MessageBox call on failure to download site list. * splash.cc: Run d2u. (SplashPage::OnInit): Set the font for the title. * splash.h: Run d2u. * threebar.cc: Run d2u. * threebar.h: Run d2u. * window.h: Run d2u. (Window::IsButtonChecked): New member function declaration. (Window::OnMessageCmd): New member function. (Window::SetDlgItemFont): New member function declaration. (Window::MAXFONTS, Window::Fonts, Window::FontCounter): New data members. * window.cc: Run d2u. (Window::IsButtonChecked): New member function definition. (Window::SetDlgItemFont): New member function definition. (Window::Window): Add initialization for FontCounter. (Window::~Window): Delete any fonts we created. * geturl.cc: Run d2u. (progress): Remove the "3" field width from the "%3d" percent-complete format indicator. Causes line to not start at beginning of text box, and does little to help with "jumping", since the "bytes downloaded so far" field is variable-width anyway. Change kb/s format field to "%03.1" to 0-pad the kb/s number in the event of painfully slow connections, or temporary slowdowns in faster connections should such more-instantaneous functionality become available. * net.h: Run d2u. (NetPage::OnMessageCmd): New member function declaration. (NetPage::CheckIfEnableNext): New member function declaration. * net.cc: Run d2u. (NetPage::OnMessageCmd): New member function definition. (dialog_cmd): Remove, subsumed into NetPage::OnMessageCmd. (check_if_enable_next): Remove. (NetPage::CheckIfEnableNext): New member function, subsumes check_if_enable_next. (propsheet.h): Add include. (NetPage::Init): Add call to CheckIfEnableNext. (load_dialog): Remove call to check_if_enable_next. (NetPage::Create): Call single-template-ID-parameter overload of PropertyPage::Create instead of three-parameter one. * Makefile.in (OBJS): Remove other.o. * other.cc: Remove file. 2002-01-01 Robert Collins * README: Update TODO's. * choose.cc (set_existence): Delete non installed packages with no mirrors. (fill_missing_category): Fix an off-by-one error. (default_trust): Ditto. Also delete any unused categories. (view::init_headers): Fix an off-by-one error. (set_view_mode): Ditto. (set_view_mode): Ditto. (create_listview): Ditto. (dialog_cmd): Ditto. (do_choose): Ditto. * io_stream.cc: Indent. * io_stream.h: Ditto. * package_db.cc: Ditto. * package_meta.h: Const correctness for SDesc (); * proppage.cc: Run d2u and indent. * propsheet.cc: Run d2u and indent. * window.cc: Run d2u and indent. * window.h: Run d2u and indent. 2001-12-28 Christopher Faylor * Makefile.in (iniparse.o): Accommodate newer bisons. 2001-12-23 Gary R. Van Sickle * window.h (Window): New file, new class. * window.cc (Window): New file, new class. * threebar.h (ThreeBarProgressPage): New file, new class. * threebar.cc (ThreeBarProgressPage): New file, new class. * splash.h (SplashPage): New file, new class. * splash.cc (SplashPage): Replace file with implementation of new class. * source.h (SourcePage): New file, new class. * source.cc: Run indent. (SourcePage): Add class implementation to this file. (do_source): Remove, functionality subsumed by SourcePage::Create() and SourcePage::OnDeactivate(). (dialog_proc): Remove, functionality subsumed by SourcePage::OnActivate(). * site.h: Run indent. (SitePage): Add class declaration. * site.cc: Run indent. (SitePage): Add class implementation. (do_download_site_info_thread): New function. (context): New var. Context info for do_download_site_info_thread(). (do_download_site_info): New function. (SitePage::Create, SitePage::OnInit SitePage::OnNext) (SitePage::OnBack): SitePage class implementation.. (dialog_cmd): Remove IDOK, ID_BACK, and IDCANCEL handlers, now handled by SitePage members. (dialog_proc): Remove, now handled by SitePage::OnInit and base class functionality. (do_site): Remove, now handled by do_download_site_info_thread() and SitePage::OnNext functionality. (get_site_list): Remove dismiss_url_status_dialog() call. * root.h (RootPage): New file, new class. * root.cc: Run indent. (dialog_cmd): Pass parent HWND parameter to note(), yesno(). (dialog_proc): Remove. (do_root): Remove (dialog_cmd): Remove IDOK, ID_BACK, and IDCANCEL clauses from switch. (RootPage::OnInit): New member function. Move get_root_dir() logic to here from do_root(). (RootPage::Create): New member function. (RootPage::OnNext): New member function. Move IDOK logic from dialog_cmd() to here. (RootPage::OnBack): New member function. * propsheet.h (PropSheet): New file, new class. * propsheet.cc (PropSheet): New file, new class. * proppage.h (PropertyPage): New file, new class. * proppage.cc (PropertyPage): New file, new class. * postinstall.cc (do_postinstall): Add owner parameter. * other.cc (do_other): Add owner parameter. * nio-file.cc (NetIO::Purl): Pass NULL parent param to note(). * nio-ftp.cc (NetIO_FTP::NetIO_FTP): Pass NULL parent param to get_ftp_auth(). * nio-http.cc (retry_get): Pass NULL parent param to get_auth(), get_proxy_auth(), and get_ftp_auth(). * nio-ie5.cc (NetIO::_url): Pass NULL parent param to note(), get_auth(), get_proxy_auth(). * netio.h (get_auth, get_proxy_auth, get_ftp_auth): Add owner param. * netio.cc (auth_common, NetIO::get_auth, NetIO::get_proxy_auth, NetIO::get_ftp_auth) (auth_common): Add owner param. Pass owner param to DialogBox. (NetIO::get_auth, NetIO::get_proxy_auth, NetIO::get_ftp_auth): Pass owner param to auth_common(). * net.h (NetPage): New file, new class. * net.cc: Run indent. (net.h, threebar.h): Add includes. (Progress): Add extern. (dialog_cmd): Remove IDOK, IDC_BACK, and IDCANCEL cases, now handled by property sheet logic. Saved temporarily for reference. (NetPage::Create, NetPage::OnInit, NetPage::OnDeactivate, NetPage::OnNext, NetPage::OnBack): New implementation of NetPage class members. (do_net): Remove. (dialog_proc): Remove. * msg.h (fatal, note, yesno): Add owner param. * msg.c (fatal, note, yesno, mbox): Add owner param. (mbox): Remove MB_TOPMOST from MessageBox call. Unnecessary and wrong now that we have a parent. * main.cc: Run indent. (commctrl.h, proppage.h, propsheet.h, splash.h, source.h) (localdir.h, net.h, site.h, choose.h, threebar.h, desktop.h): Include headers. (root_dialog_proc): extern into this file. (Progress): Progress dialog defined here, used in several other files. (WinMain): Instantiate and create Splash, Source, Root, LocalDir, Net, Site, Chooser, Desktop pages and MainWindow sheet. Call InitCommonControls() to make sure Windows is set up for our use of property sheets. Add pages to sheet. Call MainWindow.Create() to "DoModal". Remove main loop, that logic is now handled by the PropSheet class. (root.h): Add include. * log.cc (log_save): Pass NULL parent to fatal(). (exit_setup): Pass NULL parent to note(). * localdir.h (LocalDirPage): New file, new class. * localdir.cc: Run indent. (localdir.h): New include. (threebar.h): New include. (Progress): extern into this file. (LocalDirPage::Create, LocalDirPage::OnInit, LocalDirPage::OnActivate) (LocalDirPage::OnNext, LocalDirPage::OnBack): Implementation of LocalDirPage. (LocalDirPage::OnNext): Move log() call from do_local_dir() to here. (dialog_cmd): Remove IDOK, ID_BACK, and IDCANCEL handlers. (do_local_dir): Remove. (dialog_proc): Remove. (cwd): Remove, not used by anything. * install.cc: Run indent. (process.h, threebar.h): New includes. (Progress): extern into this file. (ins_dialog, ins_action, ins_pkgname, ins_filename, ins_pprogress) (ins_iprogress, ins_diskfull, init_event): Remove, now handled by ThreeBarProgressPage. (dialog_cmd, dialog_proc, dialog): Removed, handled in ThreeBarProgressPage. (init_dialog): Remove all mention of the above ins_* handles. Now handled in ThreeBarProgressPage. Altered SetWindowText()s to call ThreeBarProgressPage instance Progress directly. (progress): Alter bar update logic to call ThreeBarProgressPage instance Progress directly. (uninstall_one): Alter SetWindowText()s to call ThreeBarProgressPage instance Progress directly. (install_one_source): Alter SetWindowText()s to call ThreeBarProgressPage instance Progress directly. Pass NULL parent to note(). (do_install_thread): Rename from do_install(), added owner param. Alter SetWindowText()s to call ThreeBarProgressPage instance Progress directly. Remove dismiss_url_status_dialog() call, no longer necessary. Remove ShowWindow() call, also unnecessary now. Pass owner handle to fatal(). (do_install_reflector): New function. (do_install): New function. * ini.cc (process.h, threebar.h): New includes. (Progress): externed into this file. (find_routine): Pass NULL parent to note(). (do_local_ini): Add owner param. (do_remote_ini): Add owner param. Pass owner to get_url_to_membuf() and note(). Remove call to dismiss_url_status_dialog(). (do_ini_thread): Rename from do_ini(). Add owner param. Pass owner to do_local_ini(), do_remote_ini(), yesno(), and note(). Set next_dialog to IDD_CHOOSER on exit. (do_ini_thread_reflector): New function. (context): New var. Context for do_ini_thread. (do_ini): New function. * geturl.h (get_url_to_membuf, get_url_to_string, get_url_to_file): Add owner param. * geturl.cc (gw_dialog, gw_url, gw_rate, gw_progress, gw_pprogress, gw_iprogress) (gw_progress_text, gw_pprogress_text, gw_iprogress_text, init_event): Removed. (threebar.h): New include. (Progress): externed into this file. (dialog_cmd, dialog_proc, dialog): Removed, handled by ThreeBarProgressPage now. (init_dialog): Remove "if (gw_dialog == 0)" clause. Alter SetWindowText()s and bar setting SendMessage()s to call ThreeBarProgressPage instance Progress directly. Remove "one bar only" logic, this is now handled explicitly in the ThreeBarProgressPage class. (progress): Altered bar and text update logic to call ThreeBarProgressPage instance Progress directly. Changed kbps calculation to floating point and now print out a single decimal place. (get_url_to_membuf): Add owner param. Pass it to init_dialog. (get_url_to_string): Add owner param. Pass it to get_url_to_membuf. (get_url_to_file): Add owner param. Pass it to init_dialog. Alter bar update logic to call ThreeBarProgressPage instance Progress directly. (dismiss_url_status_dialog): Remove. * fromcwd.cc (do_fromcwd): Add owner param. Initialize found_ini to false, was true. * download.cc: Run indent. (process.h, threebar.h): New includes. (Progress): externed into this file. (download_one): Add owner param. Pass it to get_url_to_file(). (do_download_thread): Renamed from do_download. Add owner param. When calculating total_download_bytes, take binpicked and srcpicked into account. Remove call to dismiss_url_status_dialog(), no longer needed. Pass owner handle to download_one() and yesno(). (do_download_reflector, do_download): New functions. (context): New var. Context for do_download_thread(). * dialog.h (D(x)): Add owner param. * desktop.h (DesktopSetupPage): New file, new class. * desktop.cc: Run indent. (desktop.h): Add include. (dialog_proc, do_desktop): Remove, now handled in DesktopSetupPage::OnInit(). (dialog_cmd): Remove IDOK, IDC_BACK, and IDCANCEL cases, handled in DesktopSetupPage::OnFinish(), DesktopSetupPage::OnBack(), and PropSheet resp. (DesktopSetupPage::Create, DesktopSetupPage::OnInit) (DesktopSetupPage::OnBack, DesktopSetupPage::OnFinish): Implementation of DesktopSetupPage. * cistring.h: New file, new class. * cistring.cc: New file, new class. * choose.h: Run indent. (Chooser): New class declaration. * choose.cc: Run indent. (do_choose): Add owner param. Pass it to DialogBox() and fatal(). (Chooser): New class implementation. * res.rc (IDS_VERSION_INFO): New string. (IDD_SOURCE, IDD_LOCAL_DIR, IDD_ROOT, IDD_SITE, IDD_OTHER_URL) (IDD_DLSTATUS, IDD_INSTATUS, IDD_SPLASH, IDD_CHOOSE, IDD_DESKTOP): Change WS_POPUP to WS_CHILD. Numerous positioning/size changes throughout. (IDD_CHOOSE): Give template the WS_EX_CONTROLPARENT style to enable TAB control navigation etc. Give the controls a reasonable tab order. Grouped radio buttons. Something's still not right, can't tab away from back/next/cancel group reliably. * resource.h (IDD_CHOOSER): New dialog ID. * Makefile.in (OBJS): Add cistring.o, proppage.o, propsheet.o, threebar.o, and window.o. 2001-12-21 Robert Collins * choose.cc (listview_proc): Update the scrollbar when the headers are dragged. (pick_pkg_line::paint): Clip columns to prevent overlap. 2001-12-20 Robert Collins * Makefile.in: Add libcomctl32.a for setup.exe. * archive.h (archive): Prevent non-child direct creation of the class. * archive_tar.h (archive_tar): Prevent inaccurate synthetic copy and assignment. * choose.cc: Include commctrl for the choose header. (NEW_COL_SIZE_SLOP): Define without magic numbers. (pkgtrustp): Convert to function. (set_action): Remove. (add_required, fill_missing_category,default_trust): Use list syntax for package list. Use new set_action. (choose_caption): Remove. (topbucket::paint): New method. (topbucket::empty): Ditto. (topbucket::click): Ditto. (topbucket::~topbucket): Ditto. (paint): Remove i,ii and p as they are obsolete. Remove header drawing code. Use new chooser method to paint the chooser. Use new chooser itemcount method. (scroll_common): Rename to view::scroll. Scroll the header window separately. (list_vscroll, list_hscroll, list_click): Update for new chooser methods. (listview_proc): Look for header messages. (note_width): Accept stringless calls. (pick_line::set_line): Remove. (pick_line::paint): Remove. (pick_pkg_line::paint): Paint this one line, using the header column widths. (pick_category_line::paint): Paint this category, and anything in the bucket. (pick_line::click): Remove. (pick_pkg_line::click): Handle a click. (pick_category_line::click): Handle a click. (_view): Rename all to view. (view::view): Initialise the control contents. (view::set_headers): Work with the header control. (view::init_headers): Use list syntax for package list. Rearrange the width logic a little. (view::insert_pkg): Update to use the hierarchy. (view::insert_category): Ditto. (view::insert_at, view::insert_under): Remove. (view::clear_view): Update to use the hierarchy. (view::click): Update to use the hierarchy. (set_view_mode): Use list syntax for package list. Update for new chooser methods. (DoInsertItem): New helper function. (Needs a home somewhere). (create_listview): Remove choose control code and use the constructor instead. (dialog_cmd,scan2,do_choose): Use list syntax for package list. * choose.h: Include newly required headers list and package_meta. (_voew): Rename to view. (pick_line): Convert to an ABC. (pick_pkg_line): New class. (pick_catgory_line): New class. (topbucket): New class. (view::scroll): New method created from listview_scroll function. * desktop.cc (make_passwd_group): Use list syntax for package list. * download.cc (do_download): Use list syntax for package list. * fromcwd.cc (found_file): Use list syntax for package list. * iniparse.y (pacakges): Use list syntax for package list. * install.cc (uninstall_one): Use list syntax for package list. (do_install): Use list syntax for package list. * io_stream.h (io_stream): Prevent non-child direct creation of the class. Prevent inaccurate synthetic copy and assignment. * list.h: Include required header stdlib. Work on const correctness. * package_db.cc (packagedb::getpackagebyname): Remove. (packagedb::packagedb): Remove custom list code, and make db a local. (packagedb::getfirstpackage): Remove. (packagedb::getnextpackage): Remove. (packagedb::addpackage): Remove. (flush): Remove custom list code. (packagedb::registerpackage): Remove. (packagedb::packages): New static member. (packagedb::task): New static member. * package_db.h (PackageDBActions): New enum. (packagedb): Remove getfirstpackage, getnextpackage, getpackagebyname, addpackage, registerpackage, packages, packagecount, curr_package, db. Add packages, task. * pacakge_meta.cc: Include package_db.h. (packagemeta::action_caption): New method. (packagemeta::set_action): New method. * package_meta.h (CategoryPackage): Initialise key. (packagemeta): Initialise key. Add set_action and action_caption methods. Prevent inaccurate synthetic copy and assignment. * resource.h (IDC_CHOOSE_LISTHEADER): New ID. * source.cc: Include package_db for db manipulation. (save_dialog): Set the db task. * win32.h: Tell the w32 include headers what IE version to expect/require. 2001-12-06 Robert Collins * README: Wishlist updates. 2001-12-04 Robert Collins * package_db.cc (getnextpackage): Don't overrun the array. 2001-12-04 Robert Collins * Makefile.in (OBJS): Add setup_version.o. (version.c): Rename to setup_version. * choose.cc (set_action): Prevent NULL pointer dereference. (package_sort): Remove. * fromcwd.cc (canonicalize_version): Moved to version.cc. (check_ini): New function for use with find to see if there is a cached setup.ini. (do_fromcwd): Check for a cached setup.ini from any mirror site. * ini.cc (find_routine): New function, for finding cached setup.ini's. (do_local_ini): New function, drives parsing of local ini's. (do_remote_ini): New function, drives parsing and caching of remote ini's. (do_ini): Move guts to do_remote_ini and do_local_ini. * list.h (removebyindex): New method. * other.cc (save_dialog): Use new site_list and all_site_list to add the new site to the site picklist. (dialog_cmd): Only save the dialog when exiting the dialog. * res.rc (IDD_SITE): Make IDC_URL_LIST a multiple-selection control. * site.cc (site_list_type): Move to site.h (site_list): New global, sites chosen by the user. (all_site_list): New global, all potential sites. (site_list_type::init): New method, parses a mirror.lst URL string into a site_list_type object. (site_list_type::site_list_type): New method. (check_if_enable_next): Examine the control, not a local variable. (load_dialog): Select all the user chosen sites by default. (save_dialog): Adjust for multiple selection semantics. (save_site_url): Save all user chosen sites. (dialog_cmd): Don't save the dialog when the listbox recieves a message - thats not needed. Remove obsolete other_url reference. (dialog_proc): Use all_site_list instead of site_list. (site_sort): Remove. (get_site_list): Remove malloc use - use list template instead. Move site_list_type initialisation to site_list_type::init(). (get_initial_list_idx): Renamed to ... (get_saved_sites): this. Also read in multiple sites to the site_list. (do_site): Use all_site_list not site_list. Log all chosen sites. * site.h: New file, defines site related class, functions and variables. * state.h: Add comment about use of state.h (mirror_site): Remove. (other_url): Remove. (MIRROR_SITE): Remove. * version.cc: New file, for version-handling and related functions. 2001-12-02 Robert Collins * Makefile.in: Add filemanip.o to setup. * archive.cc (archive::extract_file): Use new io_stream method 'copy'. * archive_tar.h (archive_tar_file): Implement get_size virtual. (archive_tar): Ditto. * choose.cc (set_action): Use [] operator instead of getnth - its more readable. (paint): Ditto. (_view::init_headers): Ditto. (_view::insert_pkg): Ditto. (set_view_mode): Ditto. (scan2): Ditto. (do_choose): Ditto. (base): Moved to filemanip.cc. (find_tar_ext): Ditto. (parse_filename): Ditto. (_Info::_Info): Remove. * compress_bz.h (compress_bz): Implement get_size virtual. * compress_gz.h (compress_gz): Implement get_size virtual. * cygpackage.cc (cygpackage::destroy): Use array delete for char * objects. * download.cc (get_file_size): Move to filemanip.cc. (check_for_cached): Use [] operator instead of getnth - its more readable. (download_one): Ditto. * filemanip.cc: New file. * geturl.cc (init_dialog): Make url a pointer to const as it is not modified. (get_url_to_membuf): New function - contains get_url_to_string worker code. (get_url_to_string): Becomes a trivial wrapper to get_url_to_membuf. * geturl.h: Declare new prototype. * ini.cc (do_ini): Use get_url_to_membuf and pass ini_init an io_stream. Tidy up the error code a little. * ini.h: Remove __cplusplus protection for ini_init. (_Info): Remove. * inilex.l: Remove old globals. (ini_init): Use an io_stream for getting the characters. (ini_getchar): Ditto. * iniparse.y: Declare yylex as a C++ function. (add_correct_version): Use [] operator instead of getnth - its more readable. * io_stream.cc (io_stream::move_copy): Use the copy method. (io_stream::copy): New method to simply copy from one stream to another. * io_stream.h (io_stream): New static method copy, and virtual method get_size. * io_stream_cygfile.cc (io_stream_cygfile::get_size): Implement this. * io_stream_cygfile.h (io_stream_cygfile::get_size): Declare this. * io_stream_file.cc (io_stream_file::get_size): Implement this. * io_stream_file.h (io_stream_file::get_size): Declare this. * io_stream_memory.h: Include errno as it's neded to parse the header. (io_stream_memory::get_size): Implement this. (io_stream_memory::st_size): Delete this. * list.h: Change getnth into the [] operator. * netio.cc (NetIO::NetIO): Change prototype to reflect Purl not being modified. (NetIO::set_url): Ditto. (NetIO::open): Ditto. * netio.h: As for netio.cc. * nio-file.cc (NetIO_File::NetIO_File): Change prototype to reflect Purl not being modified. * nio-file.h: Ditto. * nio-ftp.cc (NetIO_FTP::NetIO_FTP): Ditto. * nio-ftp.h (NetIO_FTP::NetIO_FTP): Ditto. * nio-http.cc (NetIO_HTTP::NetIO_HTTP): Ditto. * nio-http.h (NetIO_HTTP::NetIO_HTTP): Ditto. * nio-i5.cc (NetIO_IE5::NetIO_IE5): Ditto. * nio-i5.h (NetIO_IE5::NetIO_IE5): Ditto. * package_meta.cc (packagemeta::~packagemeta): Bugfix: use array delete. * package_source.cc (packagesource::set_canonical): Ditto. (packagesource::set_cached): Ditto. * package_source.h (site::~site): Ditto. * site.cc: Change site_list_type to a class, and search and replace sort_key to key globally. 2001-12-01 Robert Collins * package_source.cc (packagesource::set_canonical): Filename was out by one. 2001-11-30 Robert Collins * Makefile.in (OBJS): Remove category_list - it's not needed. * README: More wishlist updates. * category.cc (Category::Category): Initialise new members. (Categorycmp): New function. * category.h (Category): New member key for template use. * category_list.cc: Remove. * category_list.h: Remove. (Categorycmp): New function prototype. * choose.cc: Remove category_list - not needed. (set_action): Only show the 'source' option when the source is actually available. (add_required): Fix recursion limiter to 5. (fill_missing_category): Use list access. (default_trust): Ditto. (pick_line::paint): Ditto. (_view::init_headers): Ditto. (_view::insert_pkg): Ditto. (_view::insert_category): Ditto. (_view::click): Ditto. (set_view_mode): Ditto. (do_choose): Ditto. * cygpackage.h: Remove category_list - not needed. * geturl.cc (get_url_to_string): Fix null byte insertion. * inipatse.y: Remove category_list - not needed. (categories): Use list access. * package_db.cc: Ditto. * package_db.h: Remove category_list - not needed. (packagedb): Use the list template for categories. * package_meta.cc (add_category): Ditto. * package_meta.h (CategoryPackage): Link to the category as well. (packagemeta): Use a list of CategoryPackages instead of Categories for more memory efficient cross-referencing. 2001-11-30 Robert Collins * package_db.cc (packagedb::flush): Write a canonical version for all packages irrespective of the media they were installed from. 2001-11-29 Robert Collins * Makefile.in (OBJS): Add package_source and rfc1738. * README: Wishlist update. * category_list.cc (register_category): Use references. * category_list.h (CategoryList): Ditto. * choose.cc (isinstalled): Remove. (pkgtrustp): New macro. (set_action): Use packagemeta. (add_required): Ditto. (choose_caption): Example package to choose caption, rather than state flags. (check_existence): Remove. (set_existence): Remove old code. (fill_missing_category): Use packagemeta. (keep_or_skip): Remove. (default_trust): Use packagemeta and set trust values directly. (pick_line::set_line): Use packagemeta. (_view::insert_pkg): Ditto. (_view::insert_category): Ditto. (_view::click): Ditto. (set_view_mode): Ditto. Also remove "exclude" code. (create_listview): Use packagemeta. (dialog_cmd): Ditto. (getpkgbyname): Remove (scan2): Use packagemeta. Temporarily comment out the holefinding code. (read_installed_db): Remove. (package_sort): Use packagemeta. (do_choose): Use packagemeta. Don't sort the packages - the db does that. * choose.h: Use packagemeta. * cygpackage.cc (cygpackage::cygpackage): Initialise all variables. (cygpackage::cygpackage): Ditto. (cygpackage::set_canonical_version): Copy the passed string. (cygpackage::~cygpackage): Move cleanup code to destroy(). (cygpackage::destroy): New function. (cygpackage::getfirstfile): Use a separate buffer. (cygpackage::getnextfile): Ditto. (cygpackage::Canonical_version): New function. (cygpackage::set_sdesc): Ditto. (cygpackage::set_ldesc): Ditto. * cygpackage.h (cygpackage::Canonical_version): New method. (cygpackage::set_sdesc): New method. (cygpackage::set_ldesc): New method. (cygpackage::SDesc): New method. (cygpackage::LDesc): New method. (cygpackage::set_canonical_version): New method. * desktop.cc: Include packagedb headers. (make_password_group): Use packagemeta. * download.cc: Include packagedb headers. (check_for_cached): New method to find any cached file and fill out the database info. (download_one): Take a packagesource, support multiple mirrors. (do_download): Use packagemeta. * from cwd.cc: Include packagedb headers. (found_file): Use packagemeta. * ini.cc (do_ini): Beginning of multiple-mirror support. * ini.h (CategoryPackage): Remove. (Dependency): Remove. (Package): Remove. (new_package,getpkgbyname,getpackagecategorybyname,add_category): Remove. * inilex.l: Support multiple mirrors. * iniparse.y: Include packagedb headers. (parser): Use packagemeta. (new_package): Remove. (add_correct_version): New function. (new_requirement): Remove. (add_category): Remove. * install.cc (uninstall_one): Use packagemeta. (install_one_source): New function. (install_one): Use packagemeta. (do_install): Use packagemeta. * io_stream.cc (io_stream::move): Bugfix on move/copy case. * io_stream_cygfile.cc (io-stream_cygfile::set_mtime): Do not reopen the file after setting the mtime, it makes no sense, and results in 0 length files. * io_stream_file.cc (io-stream_file::set_mtime): Ditto. * list.h: New file, template class for a form of list. * package_db.cc (packagedb::registerpackage): New function. * package_db.h (packagedb::npackages ()): New method. * package_meta.cc (packagemeta::add_version): Use list template. (packagemeta::set_installed): Ditto. (packagemeta::add_category): New method. * package_meta.h: Include necessary headers to parse the class. (CategoryPackage): New class. (packagemeta): Initialise all members. (packagemeta::SDesc): New method. (packagemeta::Categories): New method. (packagemeta::add_category): Ditto. (packagemeta::versions): Change to be a list instance. * package_source.cc (packagesource::set_canonical): New method. (packagesource::set_cached): New method. * package_source.h: Include necessary headers to parse the class. (site): New class. (packagesource::packagesource): Initialize all members. (packagesource): Make this class non-abstract. * package_version.cc (packageversion::packageversion): New method. * package_version.h (Dependency): New class. (packageversion::Canonical_vesion): New method. (packageversion::SDesc): New method. (packageversion::LDesc): New method. (packageversion::new_requirement): Ditto. (packageversion::srcpicked, binpicked): What to install. (packageversion::src, bin): Installation source data. * rfc1738.cc: New file. Escapes special characters in URL's. * rfc1738.h: Ditto. 2001-11-26 Gary R. Van Sickle * nio-http.cc (NetIO_HTTP::NetIO_HTTP): Stop header parsing when SimpleSocket::gets() returns a zero-length string, so that we don't end up eating the entire stream thinking it's all header info. 2001-11-23 Robert Collins * install.cc (badrename): Remove. (do_install): Use packagedb flush method to write /etc/setup/installed.db. * io_stream.cc (io_stream::move_copy): New method. (io_stream::move): New method. * io_stream.h (io_stream): New methods move and move_copy. * io_stream_cygfile.cc (io_stream_cygfile::move): New method. * io_stream_cygfile.h (io_stream_cygfile): New method move. * io_stream_file.cc (io_stream_file::move): New method. * io_stream_file.h (io_stream_file): New method move. * package_db.cc (packagedb::flush): New method. * package_db.h (packagedb): New method flush. 2001-11-23 Robert Collins * Makefile.in (OBJS): Add package_version. * ategory.cc (Category::Category): Update constructors. * category_list.cc (CategoryList::register_category): Insert correctly. * choose.cc: Include package_version.h, not package.h. * cygpackage.cc: Ditto. (cygpackage::uninstall): New method. * cygpackage.h (cygpackage): Rename genericpackage to packageversion. New method uninstall. * hash.cc (add, has, enumerate): Change prototype to be accurate. * hash.h (hash): Change prototypes to be accurate. * ini.h (_Info): New parameterless constructor. (CategoryPackage): New constructor. (Package): Ditto. * install.cc: Don't include unneeded headers. Include package database headers. (hash::add_subdirs): Remove. (uninstall_one): Use packagemeta->uninstall to perform the uninstallation. Don't uninstall source packages. (do_install): Just can uninstall_one once as we ignore source packages now. Don't copy the installed.old database accross, instead iterate through the packagedb packages list and write the isntalled packages out. * package_db.cc: Include package_version.h, not package.h. (packagedb::packagedb): Never let db be undefined. Record the installation filename, so we can reconstruct installed.db. (packagedb::addpackage): Insert packages in alpha sorted order. (packagedb::categories): Initialise correctly. * package_meta.cc: Include win32 and mount headers as a workaround to current io_stream limitations. Include a TODO about that. (standard_dirs): New, from install.cc. (hash::add_subdirs): New, from install.cc. (packagemeta::set_installed): Rename genericpackage to packageversion. (packagemeta::uninstall): New method. * package_meta.h: Rename genericpackage to packageversion. (packagemeta): Update constructor. (add_version, set_installed): Rename genericpackage to packageversion. (uninstall): New method. (installed_from): New member. * package_source.cc: New file. * package_source.h: New file. * package_version.cc: New file. * package_version.h: New file. * package.cc: Removed. * package.h: Removed. 2001-11-21 Robert Collins * Makefile.in (OBJS): Add category.o and category_list.o. * category.h: New file. * category.cc: New file. * category_list.h: New file. * category_list.cc: New file. * choose.cc: Include category headers. (fill_missing_category): Use package_db to access global categories. (_view::insert_pkg): Ditto. (_view::insert_category): Ditto. (set_view_mode): Ditto. (getcategorybyname): Remove. * cygpackage.h: Include category_list.h to parse this correctly. (cygpackage): New virtual &Categories. * ini.h (_CategoryPackage): More C to C++ conversion. (Category): Remove. (getcategorybyname): Remove. (register_category): Remove. * iniparse.y: Include package db and category headers. (categories): Use package_db to access global categories. (category): Remove. (ncategories): Remove. (register_category): Remove. * package.h: New virtual &Categories. * package_db.cc (packagedb::packagedb): Don't read the installed db twice. (packagedb::categories): Declare. * package_db.h (packagedb): New member categories for global categories list. 2001-11-21 Robert Collins * choose.h: Don't include ini.h * ini.h: Allow pure c++ in the header file. 2001-11-21 Robert Collins * install.cc (do_install): Write a version 2 installed.db file. * package_db.cc (packagedb::packagedb): Read version 1 and 2 installed.db files. 2001-11-21 Robert Collins * Makefile.in (OBJS): Add package abstraction objects. * choose.cc: Include package abstraction headers. (read_installed_db): Use packagedb class and ignore installed sources. * cygpackage.cc: New file. * cygpackage.h: New file. * filemanip.h (get_file_size): Use unixy types. * package.h: New file. * package.cc: New file. * package_db.cc: New file. * package_db.h: New file. * package_meta.cc: New file. * package_meta.h: New file. 2001-11-21 Robert Collins * REAME: Updates to wishlist. 2001-11-16 Robert Collins * README: Updated and added my list of wishlist and todo items. 2001-11-14 Robert Collins * Makefile.in (OBJS): Include io_stream_memory in setup.exe. * archive_tar.cc (archive_tar::write): New prototype. (archive_tar::seek): New method. * archive.h (archive_tar_file): Update write() and add seek(). (archive_tar): Ditto. * archive_tar_file.cc (archive_tar_file::write): New prototype. (archive_tar_file::seek): New method. * compress_bz.cc (compress_bz::write): New prototype. (compress_bz::seek): New function. * compress_bz.h (compress_bz): Update write() and add seek(). * compress_gz.cc (compress_gz::write): New prototype. (compress_gz::seek): New function. * compress_gz.h (compress_gz): Update write() and add seek(). * geturl.cc: Include io_stream headers. (GUBuf): Remove. (get_url_to_string): Use a io_stream_memory buffer instead of GUBuf. * io_stream.h (io_stream_seek_t): New enum. (io_stream): Update write() and add seek(). * io_stream_cygfile.cc (io_stream_cygfile::write): New prototype. (io_stream_cygfile::seek): New function. * io_stream_cygfile.h (io_stream_cygfile): Update write() and add seek(). * io_stream_file.cc (io_stream_file::write): New prototype. (io_stream_file::seek): New function. * io_stream_file.h (io_stream_file): Update write() and add seek(). 2001-11-13 Brian Keener * localdir.cc: Add headers unistd.h and port.h. (save_local_dir): Expand search logic to include local directory for location of file last-cache. (dialog_cmd): Skip IDD_ROOT when downloading and use Back button. (do_local_dir): Expand search logic to include local directory for file last-cache. * res.rc (IDD_CHOOSE_DIALOG): Add hotkey to View button. * Source.cc (dialog_cmd): Skip IDD_ROOT if select Download from Internet. (do_source): Default to Install from Internet on first entry or previous selection if backing up from IDD_ROOT or IDD_LOCAL_DIR. 2001-11-13 Robert Collins * choose.cc (find_tar_ext): Only match at the end of the string. (getpkgbyname): Prevent NULL pointer dereference. 2001-11-13 Robert Collins * Makefile.in (CFLAGS): Add warnings and -Werr. (WARNONLY_FLAGS): For sources that produce (harmless) errors no matter what. (OBJS): Add io_stream class' objects. (autoload.o): Use WARNONLY_FLAGS. (inilex.o): Ditto. (iniparse.o): Ditto. * archive.cc: New file. * archive.h: New file. * archive_tar.cc: New file. * archive_tar.h: New file. * archive_tar_file.cc: New file. * autoload.c: Fix compiler warnings (unused, deprecated conversion). * choose.cc: Use io_stream.h, not mount.h. Run indent. (find_tar_ext): Rewritten to use strstr, and to accept .tar as an extension. (read_installed_db): Use io_streams. * choose.h: Run indent. * compress.cc: New file. * compress.h: New file. * compress_bz.cc: New file. * compress_bz.h: New file. * compress_gz.cc: New file. * compress_gz.h: New file. * concat.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * concat.h: Run indent. * desktop.cc: Run indent. Include mklink2.h rather than redefining by hand. (cvsid): Fix compiler warnings (unused, deprecated conversion). (etc_profile): Fix compiler warning (deprecated conversion). (make_link): Fix compiler warning (deprecated conversion). Tidy up use of args variable - consolidate into argbuf. (start_menu): Fix compiler warning (deprecated conversion). (desktop_icon): Fix compiler warning (deprecated conversion). (make_etc_profile): Fix compiler warning (deprecated conversion). (uexists): Fix compiler warning (deprecated conversion). (check_desktop): Fix compiler warning (deprecated conversion). (check_startmenu): Fix compiler warning (deprecated conversion). * dialog.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (fatal): Fix compiler warning (deprecated conversion). * dialog.h: Run indent. * diskfull.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * download.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (download_one): Fix compiler warning (signed vs unsigned comparison). * filemanip.h: Run indent. * find.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (find): Fix compiler warning (deprecated conversion). * find.h: Run indent. * fromcwd.cc: Run indent. * geturl.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (dialog_cmd): Return a value. (dialog_proc): Remove unused variables. Return a value. (get_url_to_file): Fix compiler warning (deprecated conversion). * geturl.h: Run indent. * hash.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * hash.h: Run indent. * ini.cc: Run indent. Use io_streams. (cvsid): Fix compiler warnings (unused, deprecated conversion). (do_ini): Use io_streams for local io. * ini.h: Run indent. * inilex.l (ignore_line): Fix compiler warning (is not a prototype). Fix compiler warning (brackets for truth assignment). * install.cc: Run indent. Fix compiler warning (/* in comment). Use io_streams. (cvsid): Fix compiler warnings (unused, deprecated conversion). (dialog_cmd): Return a value. (dialog_proc): Return a value. (start_tics): Deleted - was unused. (badrename): Fix compiler warnings (unused, deprecated conversion). (standard_dirs): Fix compiler warning (deprecated conversion). (exists): Remove. (uninstall_one): Convert to io_streams. (install_one): Convert to io_streams. (do_install): Convert to io_streans. Fix compiler warning (deprecated conversion). * io_stream.cc: New file. * io_stream.h: New file. * io_stream_cygfile.cc: New file. * io_stream_cygfile.h: New file. * io_stream_file.cc: New file. * io_stream_file.h: New file. * localdir.cc: Run indent. Use io_streams. (cvsid): Fix compiler warnings (unused, deprecated conversion). (get_root_dir_now): Remove. (save_local_dir): Convert to io_streams. (dialog_cmd): Return a value. (do_local_dir): Convert to io_streams. (log.cc): Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (log): Fix compiler warning (deprecated conversion). (log_save): Fix compiler warning (deprecated conversion). * log.h: Run indent. (log): Fix compiler warning (deprecated conversion). (log_save): Fix compiler warning (deprecated conversion). * main.cc: Run indent. Don't include "netio.h". (cvsid): Fix compiler warnings (unused, deprecated conversion). (netio_test): Remove. (sid_auth): Fix compiler warning (partially bracketed initialiser). (WinMain): Return a value. * mkdir.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * mklink2.c: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (mkcygsymlink): New function. * mklink2.h: New file. * mount.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (create_mount): Remove unused variables. (cygpath): Fix compiler warning (signed vs unsigned comparison). * mount.h: Run indent. * msg.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (msg): Fix compiler warning (deprecated conversion). (mbox): Fix compiler warning (deprecated conversion). * msg.h: Run indent. (msg): Fix compiler warning (deprecated conversion). * net.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (dialog_cmd): Return a value. * netio.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (auth_cmd): Return a value. * netio.h: Run indent. * nio-file.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (NetIO_File::NetIO_File): Fix compiler warning (deprecated conversion). * nio-file.h: Run indent. * nio-ftp.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * nio-ftp.h: Run indent. * nio-http.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * nio-http.h: Run indent. * nio-ie5.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * nio-ie5.h: Run indent. * other.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (dialog_cmd): Return a value. * port.h: Run indent. * postinstall.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (cmd): Fix compiler warning (deprecated conversion). (eun): Fix compiler warning (deprecated conversion). * root.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * simpsock.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * simpsock.h: Run indent. * site.cc: Run indent. Use io_streams. (cvsid): Fix compiler warnings (unused, deprecated conversion). (get_root_dir_now): Remove. (save_site_url): Convert to io_streams. (dialog_cmd): Return 0. (get_initial_list_idx): Convert to io_streans. * source.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). (check_if_enable_next): Remove. (load_dialog): Remove unused variables. (save_dialog): Ditto. (dialog_cmd): Return a value. * splash.cc: Return a value. (cvsid): Fix compiler warnings (unused, deprecated conversion). (dialog_cmd): Return a value. * state.cc: Run indent. (cvsid): Fix compiler warnings (unused, deprecated conversion). * state.h: Run indent. * tar.h: Remove. * tar.cc: Remove. 2001-11-12 Christopher Faylor * desktop.cc (start_menu): Change start menu name to "Cygwin". (check_startmenu): Ditto. 2001-11-11 Christopher Faylor * choose.cc (parse_filename): Finish reorganization by correctly decrementing p in memmove. 2001-11-11 Christopher Faylor * choose.cc (parse_filename): Reorganize code to work around gcc optimization problem. 2001-11-09 Gareth Pearce * choose.cc (set_action): Allow skip as an option for installed packages that have version number not listed in setup.ini. 2001-11-10 Robert Collins * choose.cc (set_cation): Backout last change. (choose_caption): Ditto. 2001-11-10 Robert Collins * ini.h (actions): Remove - transferred to choose.h. (views): Ditto. * choose.h: Protect class's from "C" compilers. (actions): New enum, from ini.h. This may not be the 'right' place but that place doesn't exist yet. (_views): New enum, from ini.h. * choose.cc (set_action): Handle installed packages with a version not in setup.ini. (choose_caption): Ditto. * iniparse.y: Rearrange header order to handle new ini.h. 2001-11-10 Robert Collins * ini.h (_Info): Fix compiler warnings (signed vs unsigned comparison). (registry_category): Fix compiler warning (deprecated conversion). * iniparse.y (registry_category): Ditto. * choose.cc (cvsid): Fix compiler warnings (unused, deprecated conversion). (add_requried): Remove unused variable. (choose_caption): Handle all enumeration values via a default. (paint): Fix compiler warnings (unused, deprecated conversion). (scroll_common): Fix compiler warnings (unused, signed vs unsigned comparison). (list_clicK): Fix compiler warnings (signed vs unsigned comparison). (note_width): Fix compiler warnings (deprecated conversion). (keep_or_skip): Fix compiler warnings (unused). (_view::mode_caption): Fix compiler warnings (deprecated conversion). (set_view_mode): Fix compiler warnings (unused). (create_listview): Fix compiler warnings (unused, incorrect format, reaches end of function). (dialog_proc): Fix compiler warnings (unused). (read_installed_db): Fix compiler warnings (unused, deprecated conversion). * choose.h (_header): Fix compiler warnings (deprecated conversion). (_view): Ditto. 2001-11-08 Pavel Tsekov * simpsock.h (SimpleSocket::invalidate): Declare new method. * simpsock.cc (SimpleSocket::invalidate): Implement new method. (SimpleSocket::SimpleSocket): Initialize buf to zero. Do not allocate memory for buf in the constructor. (SimpleSocket::~SimpleSocket): Use SimpleSocket::invalidate(). (SimpleSocket::printf): Use SimpleSocket::write() instead of send(). (SimpleSocket::write): Check object consistency - return -1 on error. invalidate() the object on socket write error. (SimpleSocket::fill): Check object consistency - return -1 on error. invalidate() the object if socket read error is encountered and there is no more data available in the internal read buffer. Allocate memory for the internal read buffer. (SimpleSocket::gets): Return zero (NULL pointer) if error is encountered during fill() and no more data is available in the internal read buffer. (SimpleSocket::read): Check object consistency - return -1 on error. invalidate() the object if socket read error is encountered. * nio-ftp.cc (NetIO_FTP:NetIO_FTP): Allow 125 as valid response code to the RETR command (fix for MS IIS ftp server 5 - possibly others too). (NetIO_FTP::ok): Check if the SimpleSocket object is ok(). (NetIO_FTP::read): Use NetIO_FTP::ok(). * nio-http.cc: Check for valid return value of SimpleSocket::gets(). (NetIO_HTTP::ok): Check if the SimpleSocket object is ok(). 2001-11-09 Robert Collins * simpsock.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). (SimpleSocket::SimpleSocket): Avoid compiler warnings (deprecated conversion). (SimpleSocket::printf): Ditto. (SimpleSocket::write): Ditto. * simpsock.h (SimpleSocket): Avoid compiler warnings for constructor, printf and write. * nio-ftp.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). (NetIO_FTP::NetIO_FTP): Remove unused variable done. * nio-http.cc (cvsid): Avoid compiler warnings (not used, deprecated conversion). 2001-11-07 Charles Wilson * geturl.cc (get_url_to_string): clean up memory leak (get_url_to_file): ditto 2001-11-06 Robert Collins * localdir.cc (dialog_cmd): Go back to IDD_ROOT in every case. * source.cc (dialog_cmd): Go forward to IDD_ROOT in every case. 2001-11-06 Pavel Tsekov * fromcwd.cc (found_file): Free() memory containing the version and filepath information for a given package, before replacing the pointers which reference this memory. 2001-11-06 Robert Collins * fromcwd: Fix compiler warnings for cvsid. (canonicalize_version): Fix compilter warnings. (do_fromcwd): Ditto. * version.h: Fix compiler warnings for canonicalize_version. 2001-11-03 Robert Collins * res.rc (IDD_CHOOSE): Move the view caption to the right hand side. 2001-11-02 Robert Collins * res.rc (IDD_CHOOSE): Tweak for use on a 640x480 screen. 2001-11-02 Robert Collins * choose.cc (set_action): Correctly allow skip for any uninstalled package. 2001-11-02 Robert Collins * choose.cc (default_trust): Change the "Required" forced install category to "Base". 2001-11-02 Robert Collins * choose.cc: Ran indent. (set_action): When the requested trust level is missing and the level was not user requested, set the action to ACTION_SAME_CURR. 2001-11-01 Christopher Faylor * Makefile.in (mingw_getopt.o): Fix typo in non-verbose compilation. 2001-11-02 Robert Collins * choose.cc (_view::init_headers): Resync with the paint logic. 2001-11-02 Robert Collins * choose.cc (add_required): Allow SKIP and SRC_ONLY for currently installed packages. 2001-11-02 Robert Collins * choose.cc (default_trust): Autoset currently installed packages per the user's selection of prev/curr/exp. 2001-11-02 Robert Collins * splash.cc (dialog_proc): Return TRUE as specified in the WIN32 API. 2001-11-02 Pavel Tsekov * geturl.cc (is_showing): Remove. (is_local_install): New static variable. Controls whether the progress dialog and the supporting thread will be created. (dialog_proc): Return TRUE to WM_INITDIALOG as specified by the WIN32 API. (init_dialog): Remove usage of SetForegroundWindow and is_showing. This prevents the progress dialog to gain control over the application and fixes the "setup.exe going to background" problem. (progress): Use is_local_install. (get_url_to_string): Set is_local_install. (dismiss_url_status_dialog): Use is_local_install. * install.cc (dialog_proc): Return TRUE as specified in WIN32 API. (init_dialog): Remove usage of SetForegroundWindow. This prevents the progress dialog to gain control over the application and fixes the "setup.exe going to background" problem. 2001-11-02 Robert Collins * choose.cc (list_click): Change r to row for clarity. When we shrink the list below 1 page, scroll to the top of the list. (_view::click): Return the actual change for contractions. (dialog_proc): Return TRUE to WM_INITDIALOG as specified by the Win32 API. 2001-11-02 Robert Collins * choose.cc (dialog_cmd): Swap cygwin root selection and local dir selection order. * localdir.cc: Ran indent. (get_root_dir_now): New function. (save_local_dir): New function. (dialog_cmd): Use it and swap cygwin root selection and local dir selection order. (do_local_dir): If there is a saved local dir, read it in. * net.cc (dialog_cmd): Swap cygwin root selection and local dir selection order. * root.cc (dialog_cmd): Ditto. * source.cc (dialog_cmd): Ditto. 2001-11-01 Robert Collins * choose.cc(list_vscroll): Return 0 as required by win32. (list_hscroll): Ditto. (list_click): Ditto. 2001-11-01 Robert Collins * argv.cc: Remove. * argv.h: Remove. * main.cc(WinMain): Use __argv to retrieve command line parameters. * Makefile,in: Remove argv.o. 2001-11-01 Matt Hargett * geturl.cc (progress): Change int to unsigned int to eliminate lint warnings. * (get_url_to_string): Check for NULL pointer. * mount.cc (find2): Use free instead of delete for malloc'd memory. * nio-http.cc (NetIO_HTTP::NetIO_HTTP): Fix memory leak. 2001-10-31 Robert Collins * choose.cc(_view::insert_under): Handle linen > nlines and lines[linen] with neither a package nor a category. The lines[linen] bug was reported by Matt (matt@usa.net). (read_installed_db): Bugfix for testing whether a package has a source tarball. Reported by Matt (matt@usa.net). * geturl.cc(dialog): Rename gw_dialog to local_gw_dialog to avoid programmer confusion and lint errors. Reported by Matt (matt@usa.net). 2001-10-31 Robert Collins * argv.cc: New file, converts arguments for -mwindows programs. (Simplified derivation from dcrt0.cc.) * argv.h: New file. * Makefile,in: Add argv.o and mingw_getopt.o to setup.exe object list. Add mingw_getopt.o build rule. * main.cc(WinMain): Initialise argv and argc for use by getopt. 2001-10-27 Christopher Faylor * res.rc: Rearrange info on top line slightly. 2001-10-27 Christopher Faylor * desktop.cc (make_passwd_group): Move file creation earlier in the process to ensure that passwd-grp.bat reflects desired operation. 2001-27-10 Trevor Forbes * postinstall.cc (each): Remove "*.done" file else rename will fail. 2001-10-16 Christopher Faylor * res.rc: Oops. Take 640x480 screen size into account. 2001-10-16 Christopher Faylor * res.rc: Enlarge chooser screen. 2001-10-12 Christopher Faylor * Makefile.in: Accomodate changes to w32api_include macro. 2001-10-12 Christopher Faylor * Makefile.in: Use correct flags for windres. 2001-10-12 Christopher Faylor * Makefile.in (CFLAGS): Remove -nostdinc from CFLAGS. 2001-10-12 Christopher Faylor * choose.cc (pick_line::paint): Reorganize after botched patch. 2001-10-12 Christopher Faylor * choose.cc (pick_line::paint): Add missing declaration. 2001-10-10 Ralf Habacker * choose.cc (pick_line::paint): Add package name to sdesc for display. Wed Sep 26 21:39:00 Robert Collins rbtcollins@hotmail.com * choose.cc (_view::insert_pkg): Correctly exit loop. * iniparse.y (register_category): Always insert new categories. Fri Sep 21 13:56:32 2001 Christopher Faylor * inilex.l (yylex): For comments, eat all characters up to, but not including newline. Sun Aug 26 12:50:01 2001 John Marshall * fromcwd.cc (found_file): Use correct package name when adding an unknown package rather than random stack garbage. Sun Aug 12 14:25:21 2001 Christopher Faylor * desktop.cc (make_passwd_group): .bat files need \r\n endings. Wed Aug 8 13:53:47 2001 Christopher Faylor * desktop.cc (etc_profile): Leave environment variables untouched. 2001-08-07 Corinna Vinschen * autoload.c: Add dynamic load statements for NT/W2K advapi32 functions not available in 9x/ME. * main.cc (set_default_dacl): New function. (WinMain): Call `set_default_dacl' if running on NT/W2K. Sat Aug 4 21:35:53 2001 Christopher Faylor * ini.h (_CategoryPackage): Change pkg field to pkgname for consistency. * choose.cc: Use pkgname field when referencing _CategoryPackage throughout. (fill_missing_category): Don't add excluded packages. (default_trust): Ditto. (_view::insert_pkg): Ditto. * iniparse.y (register_category): Use consistent variable name. 2001-07-09 Egor Duda * choose.cc: Use system foreground color for text output. Sat Jul 7 00:40:28 2001 Christopher Faylor * choose.cc (set_action): Use default trust for determining reinstall and source only. (default_trust): Set default trust. (pick_line::paint): Allow source selection when reinstalling or retrieving. Fri Jul 6 18:08:49 2001 Christopher Faylor * choose.cc (isinstalled): Modify to properly accomodate special case of "download only". (set_action): Check downloaded components, not installed components if "download only". (set_existence): Always include full list of files when "download only". Fri Jul 6 00:37:05 2001 Christopher Faylor * choose.cc (pick_line::paint): Properly display "na" field when no source exists. Thu Jul 5 00:34:23 2001 Christopher Faylor * choose.cc (scan2): Ensure that older versions do not show up in "Test" slot. Mon Jul 2 15:47:59 2001 Christopher Faylor * choose.cc (set_action): Allow "Skip" action if trust != installed. * res.rc: Fix copyright. Sat Jun 30 14:05:21 2001 Michael A Chase * res.rc (IDD_LOCAL_DIR): Change caption to match the other dialog boxes. (IDD_CHOOSE): Adjust horizontal size so package names are visible. * choose.cc: Restore some more changes from 2001-06-25, throughout. (paint): Wrap some excessively long lines. (pick_line::paint): Ditto. Move the arrow in the "Current" column right to where it belongs. Move the source checkbox slightly to the right. (do_choose): List categories and required packages in setup.log.full. Sat Jun 30 23:04:59 2001 Christopher Faylor * choose.cc (scan2): Restore source scanning eliminated by previous checkin. Sat Jun 30 15:18:33 2001 Christopher Faylor * ini.h (struct _Info): Add "derived" element. * choose.cc (scan2): Try to place unknown tar files into proper slot when package exists in setup.ini but tar file does not. Sat Jun 30 13:39:00 2001 Robert Collins * choose.cc (create_listview): Call set_view_mode with VIEW_CATEGORY. (do_choose): Log the first category name. Fri Jun 29 23:07:44 2001 Christopher Faylor *ini.h: Reapply 2001-06-25 changes. * choose.cc (add_required): Ditto. Default to "Keep" state if UNINSTALL and product is installed. Default to curr state if SKIP, etc. (keep_or_skip): New function. Returns skip or keep state depending on installed state of package. (default_trust): Use keep_or_skip to set state. (_view::insert_pkg): Use calloc to allocate lines. (set_view_mode): Adapt 2001-06-25 change to set_full_list here. Sat Jun 30 11:01:00 2001 Robert Collins * choose.cc: Remove globals full_list, headers, package_indexes and nindexes. Add globals cat_headers, pkg_headers and chooser. (add_required): New function. (paint): Use the chooser for header details. Call into the chooser to paint each line. (list_click): Use new global variables. Call into the chooser to handle the click. Repaint the entire view if packages have been added or removed. (note_width): Get passed a headers struct rather than using a global variable. (fill_missing_category): New function. (default_trust): Skip non-"Required" or "Misc" packages. (pick_line::set_line (Package *)): New function. (pick_line::set_line (Category *)): New function. (pick_line::paint): New function. (pick_line::click): New function. (_view::_view): New function. (_view::set_view_mode): New function. (_view::mode_caption): New function. (_view::set_headers): New function. (_view::init_header): New function. (_view::insert_pkg): New function. (_view::insert_category): New function. (_view::insert_at): New function. (_view::insert_under): New function. (_view::clear_view): New function. (viewsplusplus): New function. (_view::client): New function. (set_view_mode): Use new chooser functionality. (set_full_list): Use new global variables. (create_listview): Instantiate chooser. Remove all hardcoded headers[] code. (dialog_cmd): On trust changes, check dependencies. (getcategorybyname): New function. (getpackagecategorybyname): New function. (scan2): Use case-insensitive package comparison. (do_choose): Use fill_missing_category (). Show some category data. * ini.h: Protect against multiple inclusion. (views) New enum. (_CategoryPackage): New struct. (_Category): New struct. (_Package): Change category to Category * from char *. (extern Category category): New global variable. (extern in ncategories): Ditto. (getcategorybyname): New prototype. (catpackagecategorybyname): New prototype. (register_category): New prototype. (add_category): New prototype. * iniparse.y: Parse multiple categories per package. (category): New global variable. (ncategories): New global variable. (new_package): Compare package against NULL, not 0. (new_requirement): Source formatting fix. (register_category): New function. (add_category): New function. * res.rc: Change IDC_CHOOSE_FULLPART to IDC_CHOOSE_VIEW. IDC_CHOOSE_VIEWCAPTION: New control. * resource.h: Change IDC_CHOOSE_FULLPART to IDC_CHOOSE_VIEW. IDC_CHOOSE_VIEWCAPTION: New control. Increment _APS_NEXT_CONTROL_VALUE. Mon Jun 25 00:56:37 2001 Michael A Chase * choose.cc (paint): Wrap excessively long lines. (list_click): Ditto. (create_listview): Ditto. (do_choose): Ditto. Replace TABs and remove CRs in lines written to setup.log.full. Allow "Yes" for source exists in setup.log.full when installing from local directories. Mon Jun 25 00:56:37 2001 Christopher Faylor * choose.cc (set_action): Only clear srcpicked when moving to next state. Allow source installation if it exists in the current "trust" state. Don't move to skip state when package is installed. (list_click): Don't allow source clicking when no source is available. (set_full_list): Display package when not is_full_action. * ini.h (is_full_action): Define. Sun Jun 17 12:06:14 2001 Christopher Faylor * install.cc (check_for_old_cygwin): New function. First stab at checking for old cygwin versions. (do_install): Call check_for_old_cygwin if there were no errors during the install. Sat Jun 16 11:33:51 2001 Michael A Chase * choose.cc (_Info::_Info): Test _source paramenter for non-NULL rather than zeroed "source" element. Fri Jun 15 20:54:43 2001 Christopher Faylor * choose.cc (scan2): Insert unknown tar archives, found on disk, into the highest available "hole" in the trust array. Fri Jun 15 00:20:48 2001 Christopher Faylor * choose.cc (set_existence): Use pointer method for indexing in trust array. (create_listview): Ditto. (scan2): Ditto. Also, use consistent variable name for indexing into trust array. * ini.h (Package): Reorganize info array for easier scanning. Fri Jun 15 00:01:51 2001 Christopher Faylor * choose.cc (isinstalled): Eliminate special download only test. (set_action): Don't move to next state if in ACTION_SAME range and not incrementing. (choose_caption): Display "Retrieve" rather than "Reinstall" when just downloading. (do_choose): Sort packages after all packages have been read. Accomodate the fact that first element in trust array is empty so that log files don't report the wrong trust value. * iniparse.y (new_package): Malloc space for package name or suffer memory corruption. Thu Jun 14 22:43:59 2001 Robert Collins * ini.h (Dependency): New structure. Declare new function. * inilex.l (yylex): Detect new setup.ini options - category and requires. * iniparse.y: Declare new setup.ini token values. (yyparse): Parse new token values. (new_requirement): New function. Thu Jun 14 22:43:26 2001 Christopher Faylor * choose.cc (read_installed_db): Eliminate obsolete code. Thu Jun 14 22:11:53 2001 Christopher Faylor * choose.cc (set_action): Set trust on "redo". (_Info::_Info): New constructor. (read_installed_db): Use new constructor. Use trusts type for iterator. * ini.h (struct _Info): Label struct, add constructor. (Package): Make installed_ix a type 'trusts.' * install.cc (uninstall_one): Unset any installed info for current package. (install_one): Allocate new Info struct for installed reflecting new installed info. (do_install): Don't output line to installed.db if package is being uninstalled. Thu Jun 14 20:33:01 2001 Robert Collins * choose.cc (getpkgbyname): Use consistent method for scanning package array. Wed Jun 13 23:33:08 2001 Christopher Faylor * choose.cc: Add some comments. (getpkgbyname): Use strcasecmp for comparisons. Wed Jun 13 16:07:00 2001 Christopher Faylor * install.cc (do_install): Avoid checking for download action if package wasn't currently retrieved. Wed Jun 13 11:27:22 2001 Christopher Faylor * choose.cc: Eliminate extra array throughout. Use element in package structure instead. Use pointers rather than array indexes where appropriate. (set_action): New function to set next action based on current. (choose_caption): New function. Returns display caption. (check_existence): Change arguments. Use pointer to 'info' structure. (set_existence): Use pointer rather than array index. (default_trust): Use trusts enum for second argument. (set_full_list): Honor exclude element in package structure. (build_labels): Eliminate. (base): Make global. Use const char * argument. (get_package_version): Eliminate. (getpkgbyname): New function. (read_installed_db): Use parse_filename to get version info. * desktop.cc (make_passwd_group): Use getpkgbyname function. * download.cc (get_file_size): const argument. (do_download): Use is_download_action to determine when something should be downloaded. * filemanip.h: Add some functions. * ini.cc (do_ini): Use NULL rather than 0 for pointer assignment. * ini.h: Use enums for actions and trusts. (is_download_action): New macro. (is_upgrade_action): Ditto. (is_uninstall_action): Ditto. (struct Package): Add new fields. * inilex.l (yylex): Detect new setup.ini options. * iniparse.y: Declare new tokens. (yyparse): Detect exclude keyword. Fill out version field even if version == 0. (new_package): Use greater granularity when allocating package array to avoid repeated calls to realloc. * install.cc (exists): const argument. (uninstall_one): Take pkg argument. (install_one): Ditto. Eliminate unneeded arguments which can be derived from package info. (do_install): Iterate over package array using a pointer. Use is_download_action to control when package should be downloaded. * tar.cc (tar_open): const argument. * tar.h: Refloect const argument. 2001-05-31 Michael Chase mchase@ix.netcom.com * main.cc (WinMain): Add setup version to starting setup.log entry Tue May 29 21:37:58 2001 Yukihiko Sohda * inilex.l: Add + to list of valid string characters. Mon May 28 20:54:50 2001 Christopher Faylor * Makefile.in: Remove more stuff in the clean target. Mon May 28 18:24:59 2001 Christopher Faylor * Makefile.in: Correctly generate iniparse.h. Tue Mar 6 19:14:00 2001 Corinna Vinschen * geturl.cc (get_url_to_file): Add parameter `allow_ftp_auth'. * geturl.h: Change declaration of `get_url_to_file' accordingly. * netio.cc (NetIO::NetIO): Add parameter `allow_ftp_auth'. Set member `ftp_auth'. (NetIO::open): Add parameter `allow_ftp_auth'. Use it in calls to constructors of derived classes. (NetIO::get_ftp_auth): New method. * netio.h: Change class definition accordingly. * nio-ftp.cc (NetIO_FTP::NetIO_FTP): Add parameter `allow_ftp_auth'. Take global variables `net_ftp_user' and `net_ftp_passwd' into account. Add code for ftp authentication retry. * nio-ftp.h: Change class definition accordingly. * nio-http.cc (NetIO_HTTP::NetIO_HTTP): Add parameter `allow_ftp_auth'. Add code for ftp authentication retry in case of proxy connection. * nio-http.h: Change class definition accordingly. * res.rc: Add FTP authentication dialog. * resource.h: Add new constants used in res.rc. * state.h: Add variables `net_ftp_user' and `net_ftp_passwd'. Sun May 27 17:12:23 2001 Christopher Faylor * res.rc (IDD_SPLASH): Add a copyright year. Sun May 27 15:42:18 2001 Christopher Faylor * Makefile.in: Make iniparse.y produce a c++ file. * choose.cc (set_existence): Revert 2001-05-27 change. * ini.cc: Remove "C" from declaration of yyparse. * iniparse.y (yyparse): Fill out version field by default when a binary install is detected and no version has been set yet. * install.cc (do_install): Mount things earlier so that we can use proper mount table settings. Don't remove mounts since they are now honored. * mount.cc (create_mount): Reread the mount table after establishing a new mount. (read_mounts): Explicitly clear root_here to allow multiple uses of this function. Ensure that there is no garbage in the table when we've exhausted all of the mounts in the registry. (cygpath): Accomodate ./ in path. Sun May 27 02:59:07 2001 Christopher Faylor Use parse_filename method to parse filenames throughout. Use get_root_dir to retrieve the current root directory throughout. Set const in argument list, where appropriate, throughout. * choose.cc (set_existence): Detect case of uninstalled package with no version. (parse_filename): New function. * filemanip.h (fileparse): New structure. * mount.cc (read_mounts): Remember where we found the root mount. (set_root_dir): New function. (get_root_dir): Ditto. * mount.h: Declare new functions. * site.cc (get_root_dir_now): Renamed from get_root_dir. (save_site_url): Use new function name. (get_initial_list_idx): Ditto. Sat May 26 21:23:59 2001 Christopher Faylor * choose.cc: Use a constant throughout to deal with chooser icon length. * res.rc (IDD_CHOOSE): Increase size of chooser box. 2001-05-07 Brian Keener * choose.cc (do_choose): Fix incorrect assignment of trust setting to use when Redownload or Sources Only selected. Thu May 10 22:35:59 2001 Christopher Faylor Reformat file after botched patch formatting. * choose.cc (which_trust): Eliminate variable. (default_trust): Don't set which_trust. (do_choose): Use selected trust when reinstalling or installing source. Thu May 10 21:04:18 2001 Christopher Faylor Change concat to cygpath throughout. Change map_filename to cygpath throughout. * concat.cc (vconcat): New function. (concat): Use vconcat. * concat.h: Reflect above. * install.cc (map_filename): Eliminate. (install_one): Free dest_file. * mount.cc (find2): Expect input key to be pointing to mount record. (in_table): New function. (is_admin): Move from root.cc. (read_mounts): New function. (path_prefix_p): New function. (cygpath): New function. * mount.h: Define new functions and structure. * root.cc (in_table): Move to mount.cc. (do_root): Call read_mounts to initialize root stuff and mount table. * site.cc (get_root_dir): Ditto. 2001-05-09 Matt Hargett * Makefile.in: Remove *.rc from clean. Tue May 8 23:33:38 2001 Christopher Faylor * choose.cc (scan2): Fix incorrect setting of TRUST_CURR rather than TRUST_PREV which produced "0" versions. 2001-05-07 Brian Keener * resource.h: Add new field IDC_CHOOSE_INST_TEXT. Modify _APS_NEXT_CONTROL_VALUE to account for addition of IDC_CHOOSE_INST_TEXT. * res.rc (IDD_CHOOSE): Modify choose dialog to use new field IDC_CHOOSE_INST_TEXT for screen text. Modify choose Dialog to allow hot keys to select Prev, Curr, Exp. * ini.h: Add new actions for ACTION_REDO and ACTION_SRC_ONLY. Modify define for LOOP_PACKAGES to include new actions ACTION_REDO and ACTION_SRC_ONLY. * choose.cc: Add new Trusts for TRUST_REDO and TRUST_SRC_ONLY. (paint): Modify to check TRUST_SRC_ONLY when determining Bitmap for source Checkbox to use. (build_labels): Add logic to allow for selection of Source only Download/ReDownload/Install/Reinstall and also to Redownload/Reinstall current version binary. (dialog_proc): Add conditional display for file selection prompt based on download vs install using IDC_CHOOSE_INST_TEXT. (do_choose): Add new logic for TRUST_REDO and TRUST_SRC_ONLY selection and modify logic for TRUST_UNINSTALL, TRUST_KEEP, and TRUST_NONE to handle the instance where Source Download/Install was selected. Modify log file to store appropriate information regarding Action selected and the new actions that were added (I.E.: ACTION_REDO and ACTION_SRC_ONLY). * download.cc: Add include for and "port.h". (download_one): Modify parameter list to include the selected action for the file to be downloaded. Modify size check against expected size to include check for ACTION_REDO and ACTION_SRC_ONLY. Modify rename of .tmp file to also remove the destination file if exists due to ability to redownload source and binary now. (do_download): Modify to also use ACTION_REDO and ACTION_SRC_ONLY in calculation of Download Bytes. Modify to also use ACTION_REDO and ACTION_SRC_ONLY in determining files selected for download. * install.cc (uninstall_one): Add check to treat a Reinstall like an upgrade so current version will be uninstalled prior to reinstall. (do_install): Add logic to handle ACTION_REDO and ACTION_SRC_ONLY for uninstalling and installing binary and source packages. * desktop.cc (make_passwd_group): Modify logic to account for a Source only cygwin install when checking for cygwin to determine need for mkpasswd and mkgroup. Mon May 7 23:33:30 2001 Matt Hargett * winsup/cinstall/res.rc: Added accelerators and improved focus order. Removed WS_DISABLED from "OK" buttons to accomodate default focus changes in net.cc and source.cc. * winsup/cinstall/net.cc (dialog_proc): If no radio button is selected, a default is selected. * winsup/cinstall/source.cc (dialog_proc): Ditto. (check_if_enable_next): Removed. No longer needed since a radio button will always be selected. (load_dialog): Removed call to check_if_enable_next. (dialog_cmd): Ditto. Also added default to switch. Tue Apr 24 23:42:02 2001 Christopher Faylor * res.rc: Resize affected text. Tue Apr 24 23:35:31 2001 Christopher Faylor * net.cc (do_net): Default to direct download. * res.rc: Move default selections to the top. 2001-04-18 Earnie Boyd * win32.h: Remove the definitions for _UNION_NAME and _STRUCT_NAME. Must now include and not the pieces. * choose.cc (create_listview): Clean up type mismatch problems. * dialog.h (NEXT(id)): Ditto. * geturl.cc (dialog): Ditto. * install.cc (dialog): Ditto. * splash.cc (load_dialog): Ditto. Wed Apr 18 18:59:21 2001 Christopher Faylor * tar.cc (class gzbz): Define dummy virtual functions. Wed Apr 18 16:01:21 2001 Christopher Faylor * Makefile.in: Add bz2 include/library support. * filemanip.h: New file. * choose.cc (find_tar_ext): New function. Returns TRUE if .tar.gz or .tar.bz2 found. (scan2): Reorganize to use find_tar_ext, accomodating .bz2 extension. (read_installed_db): Ditto. (do_choose): Ditto. * fromcwd.cc (found_file): Ditto. (do_fromcwd): Ditto. * tar.cc (class gzbz): New super class for uncompression support. (gz): New class for gzip support. (bz): New class for bzip2 support. (tar_open): Use gzbz class to control file opening. (tar_ftell): Ditto for returning position in file. (skip_file): Ditto for reading file. (tar_next_file): Ditto. (tar_read_file): Ditto. (tar_close): Ditto for close. * zlib/configure.in: Force NM substitution. * source.cc (do_source): Default to "Install from Internet". 2001-03-16 Brian Keener * nio-file.cc (NetIO_File::NetIO_File): Use `get_file_size' instead of `stat'. * choose.cc (list_click): Correct inability to select source code for download. (scan2): Modify to skip source tarballs when scanning disk for installable packages. 2001-03-10 Chris Abbey * install.cc: install sources into /usr/src instead of /, also include the sizes of source tarballs in total_bytes. * download.cc: include sizes of source tarballs in total_download_bytes. Tue Mar 6 19:31:00 2000 Corinna Vinschen * download.cc (get_file_size): Remove `static'. Tue Mar 6 19:11:00 2000 Corinna Vinschen * tar.cc (tar_open): Use `get_file_size' instead of `stat'. 2001-03-06 Brian Keener * choose.cc (paint): Modify message for nothing to download vs nothing to install/update based on installation method. (list_click): Modify to skip versions in selection process if installing from local directory and installation file does not exist. Also leaves Source Action set to N/A if the source file does not exist and installing from local directory. (check_existence): New method to check current existence of installation files based on selected installation method. (set_existence): New method to set the current existence of installation files based on selected installation method. (best_trust): Modify decision process for best trust to base decision on current trust selected (IE: Prev, Curr, or Test), existence of file and installation method selected. (default_trust): Add logic to capture the current trust level and the trust selected for the given package. (set_full_list): Expand decision criteria for displaying a package in the selection list to include file existence/non-existence and selected installation method. (build_labels): Modify criteria for label addition to include installation method and file existence/non-existence. (create_listview): Modify to establish package trust level for each package before setting up the display list. Also modification to set current trust button as the default. (dialog_cmd): Set response for Prev, Curr, Test button push to perform a reset of the selection list in addition to setting the default trust. (get_package_version): New method to provide reusable code for determining the package version from the file name for a specified trust. (scan2): Modify to use new method get_package_version and also enhance handling of the build for the structures package and extra. (read_installed_db): Modify to use the new method get_package_version and also enhance handling of the build for the structures package and extra. (do_choose): Add additional initialization of package and extra structures. Modify to use read_installed_db all the time despite install method. Modify output to setup.log.full log file to increase readability by adding additional spacing, expanded code and available versions. * ini.h: Add new fields install_exists, source_exists and partial_list_display to the structure definition for package. * res.rc (IDD_CHOOSE): Modify choose dialog Prev, Curr, and Test pushbuttons by replacing with Radio Buttons thus allowing the operator to better determine which is selected. 2001-02-20 Brian Keener * download.cc (do_download): Add new variables total_download_bytes and total_download_bytes_sofar for download progress meter. Add loop to accumulate the total bytes to download from the selected packages. * geturl.cc: Add state.h and diskfull.h to include list. Add new variables gw_iprogress, gw_pprogress, gw_progress_text, gw_pprogress_text, and gw_iprogress_text to allow for addition of total packages download progress meter and disk full percent progress meter. Add variables total_download_bytes and total_download_bytes_sofar for use by progress meters. (dialog_proc): Add new variables gw_iprogress, gw_pprogress, gw_progress_text, gw_pprogress_text, and gw_iprogress_text to allow for addition of total packages download progress meter and disk full percent progress meter. (init_dialog): Ditto. (progress): Ditto. (get_url_to_file): Ditto. * geturl.h: Add external definition for total_download_bytes and total_download_bytes_sofar. * res.rc: Add two additional progress meters (IDC_DLS_IPROGRESS) and (IDC_DLS_PPROGRESS) and three text objects (IDC_DLS_PROGRESS_TEXT) and (IDC_DLS_IPROGRESS_TEXT, IDC_DLS_PPROGRESS_TEXT) for use in the download meters. * resource.h: Add new fields for progress meters and text and update _APS_NEXT_CONTROL_VALUE. Wed Feb 21 13:05:00 2000 Corinna Vinschen * download.cc (get_file_size): Check for INVALID_HANDLE_VALUE instead for NULL. Wed Feb 21 11:21:00 2000 Corinna Vinschen * download.cc (download_one): Add missing parenthesis. Mon Feb 19 18:59:00 2000 Corinna Vinschen * download.cc (get_file_size): New function. Eliminates the need to call `stat'. (download_one): Call `get_file_size' instead of `stat'. This workarounds a problem with mingw's `stat' call. 2001-02-07 Earnie Boyd * Makefile.in: (%.o: %.rc): Specify --include-dir $(w32api_include). This is to allow cinstall to build with 2.95.2-7 and to make the use of headers consistent. 2000-12-26 Earnie Boyd * Makefile.in (autoload.o): Add target to specify -fno-inline-functions Tue Dec 26 03:46:00 2000 Matt Hargett * winsup/cinstall/res.rc: Added accelerators and improved focus order. 2000-12-10 Egor Duda * choose.cc (paint): Use system background color for text output. Sun Dec 10 19:05:25 2000 Christopher Faylor * Makefile.in: Use CXX for linking and for compiling .cc files. * configure.in: Find correct c++ compiler. * configure: Regenerate. 2000-11-17 DJ Delorie * splash.cc (load_dialog): Make message more obvious. * res.rc: Ditto. Fri Nov 17 17:15:21 2000 Christopher Faylor * Makefile.in: Use g++ to link so that libstdc++.a gets used. This is necessary for newer compilers. Wed Nov 9 2:19:00 2000 Corinna Vinschen * desktop.cc: Include "ini.h" and "version.h". (make_passwd_group): Skip the function on 9x/ME boxes when an older version of Cygwin has been installed which doesn't support mkpasswd/mkgroup on 9x/ME. * install.cc: Move the `LOOP_PACKAGES' and `pi' macros to... * ini.h: ...here. Wed Nov 8 17:10:00 2000 Corinna Vinschen * desktop.cc (make_passwd_group): Don't exit when started on 9x/ME since mkpasswd/mkgroup are usable on 9x/ME now. Sun Nov 5 12:51:42 2000 Jason Tishler * install.cc (do_install): Add call to set_cygdrive_flags to sync the mount modes. * mount.cc (set_cygdrive_flags): New function. (get_cygdrive_flags): Ditto. (default_cygdrive): Ditto. (set_cygdrive_flags): Ditto. * mount.h: Add prototype for set_cygdrive_flags. 2000-10-23 DJ Delorie * ini.h: add source actions * fromcwd.cc: check for available sources * res.rc: add checkbox bitmaps * resource.h: ditto * check-*.bmp: new * choose.cc: add source column * download.cc: download sources if called for * install.cc: [un]install sources too 2000-10-22 DJ Delorie * choose.cc (build_labels): Don't skip TRUST_PREV completely; only ignore it wrt full_list if there's already a version installed. (do_choose): Sort the list. (package_sort): New. 2000-10-12 DJ Delorie * res.rc: Add more error strings. * resource.h: Ditto. * iniparse.y (new_package): re-initialize if needed. * download.cc (do_download): Keep track of errors; notify and allow retry. * install.cc (do_install): Ditto. 2000-10-05 DJ Delorie * Makefile.in: fix %.cc rule 2000-10-04 DJ Delorie * desktop.cc: quote HOME and USER, don't . ./.profile * choose.cc (build_labels): don't include in partial list just because there's a *previous* version available. * install.cc (do_install): if installing from local directory with setup.ini and the file isn't found, look in "." also. Note errors. 2000-10-02 DJ Delorie * ini.cc (do_ini): save setup.ini locally 2000-10-02 Chris Abbey * desktop.cc: quote escapes in prompt 2000-10-02 Jason Tishler * root.cc (is_admin): New function. (read_mount_table): Check for administrative priviledges and set installation scope as appropriate. 2000-09-28 DJ Delorie * nio-ftp.cc (ftp_line): handle continuations more robustly 2000-09-14 Brian Keener * res.rc: increased the size of the site dialog (IDD_SITE) & the corresponding list box to provide for more URL's to be listed. Modified the position of the Back, Next and Cancel buttons to correspond to the new size of the dialog. 2000-09-13 DJ Delorie * install.cc (do_install): update disk fullness once per package to improve performance * choose.cc (create_listview): call ReleaseDC Mon Sep 11 22:40 2000 Harold L Hunt II * mkdir.cc: Create directories when ERROR_FILE_NOT_FOUND is returned, as it seems Samba 2.0.6+ returns this instead of ERROR_PATH_NOT_FOUND Mon Sep 11 19:35:24 2000 Christopher Faylor * site.cc (get_initial_list_idx): Don't default to saved URL if it refers to sources. 2000-09-07 DJ Delorie * splash.cc: use version.h, not local decl * res.rc: add "old version" message * resource.h: ditto * version.h: new * fromcwd.cc (canonicalize_version): make global * iniparse.y: add setup-version support, fix bug in blank line handling * inilex.l: add [exp] as alias for [test], add setup-version * Makefile.in (version.c): add setup-version tag * desktop.cc (do_desktop): remove 1.1 version number (do_desktop_setup): ditto * ini.cc (do_ini): zero out package list just in case we redo it. 2000-09-07 Jeffrey Juliano * choose.cc (list_click): Check for nindexes==0; if so, return. 2000-09-06 Andrej Borsenkow * localdir.cc: new, local package directory selection dialog; cd into selected directory * Makefile.in (OBJS): add localdir.o * dialog.h: add prototype for do_local_dir * main.cc (WinMain): initialize local_dir to cwd; add call to do_local_dir * net.cc (dialog_cmd): make DO_LOCAL_DIR next dialog * source.cc (dialog_cmd): ditto * res.rc: add DO_LOCAL_DIR dialog; remove "current directory" from presented choices in IDD_SOURCE; add IDS_ERR_CHDIR error string * resource.h: defines for DO_LOCAL_DIR dialog; define IDS_ERR_CHDIR * root.cc (dialog_cmd): make DO_LOCAL_DIR previous dialog * state.h: add local_dir variable 2000-09-06 Brian Keener * desktop.cc: added logic to handle to the new dialog and to default the setting for the new checkboxes based on whether the desktop icon or start menu link already exist. (desktop_icon): correction to desktop directories for desktop icon creation. Additional logic added for Win95 which does not appear to have Common Directories so if Common selected and null uses normal directory. (start_menu): Additional logic added for Win95 which does not appear to have Common Directories so if Common selected and null uses normal directory. (do_desktop_setup): moved the saving of the icon, creation of the bat file, profile, passwd, Start Menu link and desktop shortcut to this method from do_desktop. Made the creation of the desktop icon and start menu link conditional on settings of new dialog created for desktop. * install.cc (do_install): changed next from IDD_S_DESKTOP to IDD_DESKTOP. * main.cc (WinMain): changed case IDD_S_DESKTOP to IDD_DESKTOP. * res.rc: added new resource to create a desktop dialog with 2 checkboxes for creating the desktop icon and start menu link. * resource.h: changed IDD_S_DESKTOP to IDD_DESKTOP and added two new controls: IDC_ROOT_MENU and IDC_ROOT_DESKTOP for new dialog. * state.h: added root_menu and root_desktop for use in dialog. 2000-08-29 DJ Delorie * choose.cc (scan_downloaded_files): scan for existing files, so that the user only sees new downloads. * nio-ie5.cc (NetIO_IE5): pre-check for wininet.dll, enable dial-up * site.cc (do_site): if we can't download the mirror list, go back to the net setup box to choose another transport. * autoload.c: add more functions * Makefile.in (ALL_DEP_LDLIBS): remove wininet.a * resource.h: add WININET message * net.cc (do_net): no longer default to IE5 * simpsock.h (class SimpleSocket): new, simplify socket operations * simpsock.cc: ditto * nio-http.h: new, for direct http protocol * nio-http.cc: ditto * nio-ftp.h: new, for direct http protocol * nio-ftp.cc: ditto * netio.cc (set_url): move initialization here to handle redirections (open): add direct http/ftp * netio.h (NetIO::set_url): new * log.cc (log_save): create directory for log if needed * hash.cc, hash.h: new * Makefile: add hash.o * choose.cc: enable "uninstall" option * download.cc: invert action test to accomodate uninstalling * ini.h: add ACTION_UNINSTALL * install.cc: add uninstall functionality * res.rc: make install tag changeable * resource.h: add uninstall resources * res.rc: update mirror list URL 2000-08-24 DJ Delorie * log.cc, log.h: new files * Makefile.in (OBJS): add log.o * tar.cc: use exit_setup instead of exit * dialog.cc (fatal): use exit_setup instead of ExitProcess * msg.cc (fatal): ditto * install.cc (dialog_cmd): ditto * ini.cc (do_ini): ditto * main.cc (main): add logging * source.cc (do_source): ditto * root.cc (do_source): ditto * site.cc (do_site): ditto * other.cc (do_other): ditto * net.cc (do_net): ditto * choose.cc (do_choose): ditto * download.cc (do_download): ditto * install.cc (do_install): ditto * msg.cc (fatal): ditto * res.rc: mark password boxes as *being* password boxes. * fromcwd.cc (canonicalize_version): use multiple buffers so that multiple calls won't use the same buffer. * choose.cc (create_listview): don't default to full list if no changes (base): return computed value, not temporary :-( (do_choose): don't use installed.db if we're only downloading. 2000-08-23 DJ Delorie * nio-ie5.cc (NetIO_IE5): Fix authentication logic * nio-ie5.h (flush_io): new * netio.cc (load_dialog): note when we're initializing the dialog box, and ignore changes to the edit fields then. 2000-08-21 DJ Delorie * README: Update * fromcwd.cc (found_file): don't remember the canonicalized version * choose.cc (paint): print "nothing to do" message when list is empty. (build_labels): Use version "0.0" if no version is available. (create_listview): default to full list if nothing to install/update. (base): new, returns basename of file (read_installed_db): compare base names, not full paths 2000-08-11 DJ Delorie * choose.cc: add new chooser dialog * fromcwd.cc: use IDD_CHOOSE * ini.cc: use IDD_CHOOSE * main.cc: use IDD_CHOOSE * ini.h: cosmetic changes * res.rc: add choose dialog, bitmaps * choose-spin.bmp: new * choose-rtarrow.bmp: new * resource.h: add choose dialog controls * mount.cc: remove debug statement 2000-08-08 DJ Delorie * Makefile.in (version.c): make version checking more robust * splash.cc (load_dialog): handle case where there's no version 2000-08-07 DJ Delorie * (all): add cvsid tags * Makefile.in: generate version.c from ChangeLog, add splash.o * splash.o: new * res.rc: add splash screen 2000-08-02 DJ Delorie * net.cc: remove proxy password code * res.rc: remove proxy user/pass from net, add auth dialogs * netio.cc,h: add sys/proxy auth methods * nio-ie5: use them, check for http status codes * state.h: add system authorization * concat.cc (concat): canonicalize x:// to x:/ (exception to :// meaning an url) 2000-08-02 Norman Vine * msg.cc (mbox): added MB_TOPMOST to MessageBox type flags 2000-08-01 DJ Delorie * postinstall.cc (each): don't rename files we ignore (do_postinstall): set CYGWINROOT to root_dir, chdir there * desktop.cc: have /etc/profile call ~/.profile and ~/.bashrc 2000-07-31 DJ Delorie * desktop.cc: reverse PATH so /usr/bin precedes /bin 2000-07-18 DJ Delorie * autoload.c: new, autoload dlls that might not be available. * Makefile.in (OBJS): add autoload.o * res.rc: rewrite root options (text/binary, system/user) to be more obvious. * site.cc (get_site_list): trim displayed URL, sort by domain * net.cc (do_net): make IE5 default to checked, for now * choose.cc (do_choose): sort packages correctly * ini.cc (do_ini): handle parse errors more gracefully (yyerror): ditto (fprintf): line buffer output (do_ini): if we can't load setup.ini, go back to the site list. * ini.h: add "unknown" trust level * inilex.l: absorb unknown trust levels and key/value pairs, add line number logic * iniparse.y: handle parse errors more gracefully. * install.cc: skip packages with no valid install entry 2000-07-17 DJ Delorie * coding standards fixups, many files * mkdir.cc: warn about deletions *before* deleting them 2000-07-17 Jeff Juliano * res.rc (IDD_OTHER_URL): reorder to give default focus to entry * other.cc (dialog_cmd): save download site URL * site.cc (get_root_dir): new (save_mirror_site): new (dialog_cmd): save download site URL (get_site_list): make list big enough to add prev site (get_initial_list_idx): new, read last-used URL from file and append it to site_list (do_site): call get_initial_list_idx * concat.cc (concat): avoid segfault when first parm is null 2000-07-13 DJ Delorie * postinstall.cc: new * Makefile.in: add postinstall.o * concat.h: add backslash () * concat.cc: ditto * desktop.cc (etc_profile): don't do postinstall (backslash): moved to concat.cc (uexists): new (make_postinstall_script): run directly (do_desktop): chain to do_postinstall * dialog.h: add exit_msg, do_postinstall * download.cc: use exit_msg * install.cc: ditto * main.cc: add postinstall, exit_msg * resource.h: add postinstall * README: add more to-do items 2000-07-12 DJ Delorie * desktop.cc: add /etc/postinstall/ support * install.cc: add more "standard" directories 2000-07-11 DJ Delorie * desktop.cc: create /etc/profile * desktop.cc: fix include syntax * Makefile.in: add auto-dependencies * root.cc: support system vs user * desktop.cc: ditto * mount.h: ditto * mount.cc: ditto * install.cc: ditto * res.rc: ditto * resource.h: ditto * state.h: ditto * desktop.cc: make sure we use backslashes, not slashes. * desktop.cc: don't set PATH in cygwin.bat, create /etc/passwd * geturl.cc: change math for percentage to avoid overflow * install.cc: ditto * download.cc: post "download complete" message. * root.cc: pre-fill in defaults if needed, don't start browse at root_dir unless it's set. * desktop.cc: quote $PATH in case it has spaces in it 2000-07-10 DJ Delorie * Makefile.in: add desktop.o and mklink2.o * dialog.h: add do_desktop * install.cc: create standard directories, call do_desktop * res.rc: add cygwin.ico as a file also * desktop.cc: new, do shortcuts, batch files, and icons * mklink2.c: new, for COM * README: update to-do list 2000-07-10 DJ Delorie * ini.cc (do_ini): don't worry about timestamps if we're not actually installing. 2000-07-09 DJ Delorie * Makefile.in: add -I$(srcdir) for ini.h 2000-07-06 DJ Delorie * Replace everything with a new GUI version * zlib/gzio.c: add gzctell() for progress displays 2000-06-22 DJ Delorie * setup.c (tarx): re-add call to write_pkg() 2000-06-07 DJ Delorie * cygcalls.c: new, call cygwin1.dll functions directly * cygcalls.h: header for same * Makefile.in: add cygcalls.[ch], remove mount/cygpath/umount exes, fix cinstall.rc dependencies. * path.c: remove unneeded code * setup.c: use cygcalls instead of xcreate_process. uncompress embedded files with zlib add "-d" for "download only" add "-h" for help postpone mount changes until very end add download progress indicators pack multi-column listings more auto-delete temp files customize banner message according to options prompt user for text/binary mounts add warnings about empty setup directory, root installs, etc 2000-05-24 DJ Delorie * tar.c: New file; built-in tar using zlib. * tar.h: New file; header for same. * ctar.c: New file; test program for same. * Makefile.in: add built-in tar, remove tar.exe and gzip.exe * path.c (pathcat): convert slashes and canonicalize, instead of aborting * setup.c (tarx): add support for built-in tar (main): accept unix-style slashes, check root dir for drive letters, warn about installing in /, make sure cwd is empty for internet installs, defer mounts to end of install, support built-in tar. Fri May 19 23:44:37 2000 Christopher Faylor Fix compiler warnings throughout. * pkg.c (init_pkgs): Make static 'stuff' global_pkgstuff for use in get_pkg_stuff. * setup.c: Make 'root' global. (istargz): Return pointer to "stem" of matched .tar.gz file. (tarx): Special case cygwin-20000301 to == cygwin-1.1.0.tar.gz. Remove bogus check_for_installed check. (recurse_dirs): Add preliminary support for .bat file execution. (create_uninstall): Eliminate unneeded parameter. (do_start_menu): Ditto. (mkmount): Ditto. (get_pkg_stuff): Ditto. Check for currently installed cygwin by scanning for the version number. Eliminate unneeded argument to create_uninstall. (getdownloadsource): Add 'name' to list of names rather than url. (main): Eliminate unneeded argument in get_pkg_stuff. Eliminate unneeded argument in mkmount and do_start_menu. 2000-05-18 DJ Delorie * setup.c (optionprompt): allow multi-column, clean up message about more options, be more robust about user input. (getdownloadsource): make the mirror URL a macro. (main): do mounts after done prompting user. Tue May 2 00:56:41 2000 Christopher Faylor * setup.c (cleanup): Inverse order of deletion stands a better chance of deleting cygpath.exe. Still seems to suffer from occasional races, though. (cleanup_on_signal): Perform convoluted dance to accomodate win95 and w2k. (output_file): Defend against an unlikely handle leak. (main): Don't set up signal handling until we have something special to do. Mon May 1 17:56:32 2000 Christopher Faylor * path.c (kill_cygpath): Delete function. (exit_cygpath): Make more defensive so that it can be called at any time. (cygpath_pipe): Don't set up signal here. Do it in main(). * setup.c (istargz): New function. (recurse_dirs): Look for *.gz pattern rather than *tar.gz since *tar.gz inexplicably fails on samba mounted partitions. Use istargz to match tar.gz tail. (processdirlisting) Use istargz to match tar.gz tail. (cleanup): Renamed from filedel. (cleanup_on_signal): New function. Called on CTRL-C. (main): Record handle of main thread so that it can be suspended when CTRL-C occurs. Set up cleanup_on_signal signal handler. Mon May 1 11:05:07 2000 Christopher Faylor * setup.c (do_start_menu): Don't concatenate paths to already built paths. Sun Apr 30 22:37:34 2000 Christopher Faylor * path.c (exit_cygpath): Wait for subprocess to exit before returning. (cygpath_pipe): Don't call exit_cygpath. Let main atexit routine do that. * pkg.c (init_pkgs): Accept root argument. Make registry key "cygwin root"-specific. * setup.c (filedel): Call exit_cygpath here so that we can be assured that cygpath subprocess has died. This allows us to delete cygpath.exe and cygwin1.dll. (optionprompt): Initialize response to -1 so that second screen of mirrors will appear. (get_pkg_stuff): Don't attempt to use HKCLU. Pass root to init_pkgs. * setup.h: Reflect init_pkgs prototype change. Sat Apr 29 23:53:30 2000 Christopher Faylor * pkg.c (init_pkgs): Accept an argument to control what root registry key should be used. * setup.c (get_pkg_stuff): Use HKCLU registry key if default fails. * setup.h: Reflect init_pkgs prototype change. Sat Apr 29 23:27:14 2000 Christopher Faylor * error.c (winerror): Respond to gcc warning. * path.c (cygpath_pipe): Ditto. * setup.c (filedel): Call sa_cleanup on deleteme. (create_shortcut): Coerce argument to eliminate compiler warning. (tarx): Use installed version of cygwin1.dll, overriding tar file name. (refmatches): New function. Tests if ref is contained in a list of packages to install. (filematches): New function. Tests if filename matches one of a list of packages to install. (recurse_dirs): Accept list of packages to install. Generalize tar.gz test to accomodate _tar.gz. (prompt): Ensure that stdout is flushed prior to asking for input. (findhref): Initialize variables to quiet a compiler warning. (processdirlisting): Accept list of packages to install. Special case cygwin tar file version number. (downloaddir): Accept list of packages to install. (downloadfrom): Ditto. (create_uninstall): Eliminate unneeded variables. Quote arguments to regtool. (do_start_menu): Don't create uninstall bat file if updating or user specified a list of packages. (mkmount): Eliminate unneeded variables. (get_pkg_stuff): New function. Checks for previous unversioned installation. (main): Accept -u and -f options and package names on the command line. Use get_pkg_stuff to initialize package information. Umount /etc. Call recurse_dirs and downloadfrom with list of package to install. Ensure that all /usr/local directories are created. Output installation time to setup.log. * setup.h: Add some prototypes. * xsystem.c (xcreate_process): Eliminate unneeded variable. Sat Apr 29 12:43:08 2000 Christopher Faylor * setup.c (optionprompt): Don't overlap display of already seen options on next page. (geturl): Print name of site which we're connecting to rather than "ftp site". (processdirlisting): Avoid URLs that contain a /. or ./ . Is this test too simplistic? (do_start_menu): Use pathcat to build path to \bin to avoid problems when user chooses x:\ as their root. (main): For now, default to "non-update" mode. Allow -u option to signify an update. Sat Apr 29 00:26:06 2000 Christopher Faylor * pkg.c: New file. * setup.c (tarx): Skip already installed or older packages. Report when a package has been updated. (processdirlisting): Skip already installed or older packages. (main): Detect -f option for forced installation. Initialize pkg stuff if appropriate. * setup.h: Add pkg definitions. Thu Apr 27 14:21:30 2000 Christopher Faylor * setup.c (findhref): Return NULL on empty string. Eat any trailing ";something". (processdirlisting): Attempt to limit recursively processing the same directory. Thu Apr 27 11:42:23 2000 Christopher Faylor * setup.c (filedel): New function. (output_file): Keep track of files extracted from setup.exe for subsequent deletion. (tarx): Close process handle of child tar process or suffer handle leak. (getdownloadsource): Close mirror file so that it can be unlinked. (processdirlisting): Return total number of files extracted. (main): Initialize array of files to delete. Ensure that files are closed on exit. Make the directory that setup.exe is started from == the directory where temporary files are placed. Issue an error if no files were found to download. * xsystem.c (xcreate_process): Close the thread handle. Close the process handle if we waited for it to exit. Thu Apr 27 09:54:19 2000 Christopher Faylor * setup.c (main): Change version number output. Thu Apr 27 09:23:17 2000 Christopher Faylor * setup.c (tarx): Use full path name to tar executable. (main): Build full pathname to tar executable. Create /usr/local/etc by default. Wed Apr 26 22:16:57 2000 Christopher Faylor * setup.c (findhref): Change method for scanning for href= to choose the last one on the line. This is still not foolproof and probably will need to be changed eventually. Don't abort if no "size" field is evident. (processdirlisting): Fix boolean algebra. Wed Apr 26 01:10:39 2000 Christopher Faylor * main.c (tarx): Add some code for future task of unmounting directories encountered in tar file. Sat Apr 22 16:37:03 2000 Christopher Faylor * setup.c (findhref): Decode file size, when appropriate. (needfile): New function. Returns 1 when file should be downloaded. (processdirlisting): Always download if file size does not match. Prompt when download fails for some reason. (getdownloadsource): Accomodate findhref argument changes. Sat Apr 22 15:13:42 2000 Christopher Faylor Throughout, use global session handle rather than reinitializing for each connect. Don't pass session as an argument to setup.c functions. * setup.c (geturl): Only issue "Connecting to.." message when using http or first time for ftp since subsequent connections will be fast. (processdirlisting): Allocate space for "N" when user has specified "N"ever option so that it can be subsequently freed. (main): Abort if we can't get the list of mirrors. Thu Apr 20 16:41:42 2000 Christopher Faylor * setup.c (main): Umount /bin and /lib. Wed Apr 19 13:34:44 2000 Christopher Faylor * setup.c (main): Create an empty /var/run/utmp. Tue Apr 18 19:16:56 2000 Christopher Faylor * Makefile.in: Add umount to list of files to include in setup.exe. * setup.c (xumount): New function for unmounting directories. (main): Unmount /usr. (mkmount): Unmount "unix directory" before trying to figure out where to create the directory. Tue Apr 18 17:28:55 2000 Christopher Faylor * setup.c (mkmount): Use xcreate_process to start mount process, avoiding the shell. (main): Don't do buffering on stdout or prompts won't be displayed correctly if running in a cygwin shell with CYGWIN=tty. Tue Apr 18 15:35:19 2000 Christopher Faylor * setup.c (main): Remove the CYGWIN environment variable before starting any cygwin programs. Mon Apr 17 19:20:52 2000 Vadim Egorov * setup.c (geturl): Use alternative method for finding filename part of a URL. (processdirlisting): Accomodate strange output from non-MS ftp proxy. (downloaddir): Unlink file containing dir listing. (downloadfrom): Ditto. Mon Apr 17 00:00:49 2000 Christopher Faylor * setup.c (main): Disallow running setup.exe from the "root". Sun Apr 16 18:50:58 2000 Christopher Faylor Use "warning" function, where appropriate, to output warnings. * setup.c (warning): New function -- outputs warning to console and log file. (tarx): Fix index used to reset file protection. (main): Open the log file earlier so that more stuff can be sent to it. Sat Apr 15 20:05:33 2000 Christopher Faylor * setup.c (processdirlisting): Make "N" option a little less aggressive. Fri Apr 14 11:11:29 2000 Christopher Faylor * setup.c (tarx): Wait to after tar has completed to reset protections or suffer races with tar process. Thu Apr 13 12:51:19 2000 Christopher Faylor * Makefile.in: Eliminate duplicate -nostdinc from CFLAGS. * setup.c (create_uninstall): Create the uninstall .bat file in the "root" so that we can remove the /bin directory. Add bin\cygwin.bat to list of files to be deleted. Fix directory detection for determining when to use 'rmdir'. (do_start_menu): Add /usr/local/bin to the path. (main): Add slop to files.array allocation so that we don't have to worry about reallocating the array when it grows too large when doing some trivial "pushes". Add /tmp and /usr/local/{bin,lib} to list of files. Thu Apr 13 01:59:44 2000 Christopher Faylor * setup.c (processdirlisting): Fix handling of "A" for "A"lways download. Thu Apr 13 01:11:45 2000 Christopher Faylor * path.c (kill_cygpath): New cleanup function. (exit_cygpath): New cleanup function. (cygpath_pipe): New function. Sets up cygpath in the background for translating filenames. (pathcvt): Use background cygpath for file translation. * setup.c (tarx): New function. Called to extract tar files, capture logging output, and translate it to Windows format. (recurse_dirs): Use 'tarx' function to extract files. (create_uninstall): Use file list built up by tarx rather than reading the log file. (mkmount): Add ability to mount root. (main): Track elapsed install time. Mount root. * starry.h: Add index field to strarry for tracking of tarx's usage of this structure. * xsystem.c (xcreate_process): Return proces handle when not waiting. Mon Apr 10 22:44:56 2000 Christopher Faylor * path.c: New file. (pathfp): New function. Preliminary work for new -f cygpath functionality. * Makefile.in: Add new file. (pathcvt): Move to new file. (dtoupath): Ditto. (utodpath): Ditto. (pathcat): Ditto. * setup.c (processdirlisting): Always open file in text mode. (create_uninstall): Ditto. (getdownloadsource): Ditto. (main): Ditto. Mon Apr 10 20:33:40 2000 Christopher Faylor * xsystem.c: New file. * Makefile.in: Accomodate new file. * setup.c (xsystem): Move to new file. (recurse_dirs): Accept handle to output log file. Don't use ">" redirection to trap tar output. Use supplied handle instead. (create_uninstall): Accept FILE pointer to opened log file. Don't unlink log file here. (do_start_menu): Accept FILE pointer to pass to create_uninstall. (main): Open log file here and pass it to various functions. Unlink when done. Mon Apr 10 17:15:52 2000 Christopher Faylor Change occurrences of .usr.bin to .bin throughout. * setup.c (geturl): Increase number of retries to 20. Let user know what's going on during long connects. (processdirlisting): Accept "A"lways and "N"ever as update options. (create_uninstall): Load cygwin1.dll from the current directory rather than \bin. (main): Add some expository text. Sun Apr 9 20:59:15 2000 Christopher Faylor * Makefile.in: Change method for compressing cygwin1.dll to avoid creating a cygwin1.dll in the current directory. Ensure the addition of -nostdinc to MINGW_CFLAGS. Sun Apr 9 02:15:47 2000 Christopher Faylor * Makefile.in: Augment clean target. Fri Apr 7 17:04:02 Ron Parker * README: Added info about non-working mingw implementation * gzip.exe.gz: Replace with a version from the same build as the other tools. * tar.exe.gz: Replace with a version from the same build as the other tools. * mount.exe.gz: Add to repository until, mingw can build setup. * cygpath.exe.gz: ditto * cygwin1.dll.gz: ditto * setup.c: Overwrite /bin and /lib mounts. Generate working shortcut for Win9x. Display only a screenfull of options at a time. Call all tools with an absolute path. * setup.dsp: Restore the carriage returns, MS Developer Studio needs them. * setup.dsw: ditto * zlib.dsw: ditto Thu Apr 6 19:15:27 2000 Christopher Faylor * Makefile.in: Add "-nostdinc" to regular CFLAGS. Add target to grab cygwin1.dll from ../cygwin subdirectory. * gzip.exe.gz: Update. * tar.exe.gz: Update. Wed Apr 5 10:52:08 2000 Christopher Faylor * Makefile.in: Use ZLIB variable as a target. Sat Apr 1 22:49:09 2000 Christopher Faylor * Makefile.in: Eliminate traces of cygwinisms. Don't link with libmsvcrt.a. It's unneeded. Build .rc file on the fly from various sources. * configure.in: Locate correct objcopy. * configure: Regenerate. Sat Apr 1 20:48:09 2000 Christopher Faylor * Makefile.in: New file. * configure.in: New file. * configure: New file. * zlib/Makefile.am: New file. * zlib/configure.in: New file. * zlib/aclocal.m4: New file. * zlib/acinclude.m4: New file. * zlib/configure: Regenerate from configure.in. * zlib/Makefile.in: Regenerate from Makefile.am %%% $Id$ $Revision$