76 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| //
 | |
| // EX19CON.CPP
 | |
| //
 | |
| //  C++/DOS Example program for ArchiveLib 2.0
 | |
| //
 | |
| //  Copyright (c) Greenleaf Software, Inc. 1994 - 1996
 | |
| //  All Rights Reserved
 | |
| //
 | |
| // MEMBERS/FUNCTIONS DEMONSTRATED
 | |
| //
 | |
| //  ALName::ALName()
 | |
| //  ALName::~ALName()
 | |
| //  ALName::ChangeExtension()
 | |
| //  ALName::ChangeTrailingChar()
 | |
| //  ALName::GetName()
 | |
| //  ALName::StripFileName()
 | |
| //  ALName::StripPath()
 | |
| //  ALName::WildCardMatch()
 | |
| //
 | |
| // DESCRIPTION
 | |
| //
 | |
| //  This program demos the wild card matching functions.  You can see
 | |
| //  that the wildcards we support here are just a little bit better than
 | |
| //  those that you get for free with MS-DOS wild card matching.
 | |
| //
 | |
| //  We also demo a bunch of the ALName functions here.
 | |
| //
 | |
| // REVISION HISTORY
 | |
| //
 | |
| //  February 1, 1996  2.0A  : Second release
 | |
| //
 | |
| //
 | |
| 
 | |
| #include <conio.h>
 | |
| 
 | |
| #include "arclib.h"
 | |
| 
 | |
| int main()
 | |
| {
 | |
|  cout << "Archive Library 2.0\nEX19CON.CPP\n\n";
 | |
|  cout << "This program demos the wild card matching functions.  You can see\n";
 | |
|  cout << "that the wildcards we support here are just a little bit better than\n";
 | |
|  cout << "those that you get for free with MS-DOS wild card matching.\n\n";
 | |
|  getch();
 | |
| 
 | |
|  ALName test( "Greenleaf Software", AL_UPPER );
 | |
|  cout << "test = " << test << "\n";
 | |
|  cout << "test.WildCardMatch( \"*Soft*\" ) = "
 | |
|       << test.WildCardMatch( "*Soft*" )
 | |
|       << "\n";
 | |
|  cout << "test.WildCardMatch( \"*Hard*\" ) = "
 | |
|       << test.WildCardMatch( "*Hard*" )
 | |
|       << "\n";
 | |
|  cout << "test.WildCardMatch( \"GREENLEAF ????ware\" ) = "
 | |
|       << test.WildCardMatch( "GREENLEAF ????ware" )
 | |
|       << "\n";
 | |
|  ALName file( "EX19CON.CPP" );
 | |
|  cout << "file = " << file.GetName() << "\n";
 | |
|  cout << "file.ChangeExtension() = "
 | |
|       << file.ChangeExtension()
 | |
|       << "\n";
 | |
|  file = "EX19CON.CPP";
 | |
|  cout << "file.ChangeTrailingChar() = "
 | |
|       << file.ChangeTrailingChar()
 | |
|       << "\n";
 | |
|  file = "EX19CON.CPP";
 | |
|  cout << "file.StripFileName() = "
 | |
|       << file.StripFileName()
 | |
|       << "\n";
 | |
|  file = "EX19CON.CPP";
 | |
|  cout << "file.StripPath() = "
 | |
|       << file.StripPath()
 | |
|       << "\n";
 | |
|  return 1;
 | |
| }
 |