[comp.windows.ms] Windows Sample Source Wanted

usenet@cps3xx.UUCP (Usenet file owner) (12/13/88)

As a programmer new to MS Windows, I am interested in seeing some sample
source for useful Winapps.  I have the SDK 2.1, but the sample source
there isn't too useful.  I am especially interested in editing and
comm support; source to applications resembling Notepad and Terminal would
be extremely interesting.  But, any Windows source (or for that matter,
binaries) would be educational.  Can you help?

Thanks.

Mark Riordan   Michigan State Univ.   riordanmr@clvax1.cl.msu.edu

foz@ihdev.ATT.COM (The fozman) (12/18/88)

In article <1296@cps3xx.UUCP>, usenet@cps3xx.UUCP (Usenet file owner) writes:
> As a programmer new to MS Windows, I am interested in seeing some sample
> source for useful Winapps.  I have the SDK 2.1, but the sample source
> there isn't too useful.  I am especially interested in editing and
> comm support; source to applications resembling Notepad and Terminal would
> be extremely interesting.  But, any Windows source (or for that matter,
> binaries) would be educational.  Can you help?

Me too! Especially 'Terminal'-like sources.

I can be reached at att!ihdev!foz or att!ihlpf!foz

Thanks to all those who will respond...

Bill Thompson

mcdonald@uxe.cso.uiuc.edu (12/19/88)

Someone asked for some Windows code. Here is a tiny weeny little
thing that may actually be useful. It is mostly taken from the
an example in the Windows SDK, but the last part shows how to
send data to the parallel port. I doubt that Microsoft cares that I
stole about 75% of it from them, as you can't compile it without
getting (thank God I don't have to say "buy" - I got it free )
their SDK.

I have been looking for a way to print binary files (usually the output
from my TeX dvi driver) to my HP Laser-Jet II (hence the default file
extension .jep) in the background.  To date I have failed totally.
FINALLY, I have cooked up this thing that does it under Microsoft Windows.
It appears to work, but I am claiming that it is ALPHA TEST!!!
You are warned! It seems to print at about half the speed of a 
simple non-Windows "copy /b filename prn:". I would be very interested
in comments or, especially, bug reports. 

DougMcDonald (mcdonald@uxe.cso.uiuc.edu)

This thing was shar'ed by a PC shar program - I hope it works on
your machine; in any case it can be undone with an editor.


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  binprint.c binprint.rc binprint.def binprint.h mcomp.bat
# Wrapped by JDM on Wed Dec 14 11:08:52 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f binprint.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"binprint.c\"
else
echo shar: Extracting \"binprint.c\" \(15574 characters\)
sed "s/^X//" >binprint.c <<'END_OF_binprint.c'
X/****************************************************************************
X
X    PROGRAM: BinPrint.c
X
X    PURPOSE: Prints BINARY files
X
X       adapted from "fileopen.c" in the Windows development kit.
X       There is no copyright notice on the file "fileopen.c" so
X       I stole it.
X        
X***************************************************************************/
X#include <stdio.h>
X#include "windows.h"
X#include "binprint.h"
X
XHANDLE hInst;
X
Xchar FileName[128];			       /* current filename	     */
Xchar PathName[128];			       /* current pathname	     */
Xchar OpenName[128];			       /* filename to open	     */
Xchar DefPath[128];			       /* default path for list box  */
Xchar DefSpec[13] = "*.*";		       /* default search spec	     */
Xchar DefExt[] = ".jep";			       /* default extension	     */
Xchar str[255];				       /* string for sprintf() calls */
Xint  isfilevalid;                              /* success of dialog          */
Xint  inProgress = 0;
Xint  pleaseCancel = 0;
Xvoid PrintTheFile(HWND);
X
X/****************************************************************************
X
X    FUNCTION: WinMain(HANDLE, HANDLE, LPSTR, int)
X
X    PURPOSE: calls initialization function, processes message loop
X
X    COMMENTS:
X
X	DefSpec is set to "*.*" for use in the list box.  This will be
X	changed whenever the user specifies a wild card in the OpenDlg Edit
X	box.  One could also get the default extension from the WIN.INI
X	file.
X
X****************************************************************************/
X
Xint PASCAL WinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow)
XHANDLE hInstance;
XHANDLE hPrevInstance;
XLPSTR lpCmdLine;
Xint nCmdShow;
X{
X
X    HWND hWnd;
X    MSG msg;
X    RECT Rect;
X
X    if (!hPrevInstance)
X	if (!BinPrintInit(hInstance))
X	    return(NULL);
X
X    hInst = hInstance;
X
X    hWnd = CreateWindow("BinPrint",
X	"Prints Binary Files",
X	WS_OVERLAPPEDWINDOW,
X	CW_USEDEFAULT,
X	CW_USEDEFAULT,
X	GetSystemMetrics(SM_CXSCREEN)/2,
X	GetSystemMetrics(SM_CYSCREEN)/5,
X	NULL,
X	NULL,
X	hInstance,
X	NULL);
X
X    if (!hWnd)
X	return(NULL);
X
X
X    ShowWindow(hWnd, nCmdShow);
X    UpdateWindow(hWnd);
X
X    while (GetMessage(&msg, NULL, NULL, NULL)) {
X	{
X	    TranslateMessage(&msg);
X	    DispatchMessage(&msg); 
X	}
X    }
X    return(msg.wParam);
X}
X
X/****************************************************************************
X
X    FUNCTION: BinPrintInit(HANDLE)
X
X    PURPOSE: Initializes window data and registers window class
X
X****************************************************************************/
X
XBOOL BinPrintInit(hInstance)
XHANDLE hInstance;
X{
X    HANDLE hMemory;
X    PWNDCLASS pWndClass;
X    BOOL bSuccess;
X
X    hMemory = LocalAlloc(LPTR, sizeof(WNDCLASS));
X    pWndClass = (PWNDCLASS) LocalLock(hMemory);
X    pWndClass->hCursor = LoadCursor(NULL, IDC_ARROW);
X    pWndClass->hIcon = LoadIcon(NULL, IDI_APPLICATION);
X    pWndClass->lpszMenuName = (LPSTR) "BinPrint";
X    pWndClass->lpszClassName = (LPSTR) "BinPrint";
X    pWndClass->hbrBackground = GetStockObject(WHITE_BRUSH);
X    pWndClass->hInstance = hInstance;
X    pWndClass->style = NULL;
X    pWndClass->lpfnWndProc = BinPrintWndProc;
X
X    bSuccess = RegisterClass(pWndClass);
X
X    LocalUnlock(hMemory);
X    LocalFree(hMemory);
X    return(bSuccess);
X}
X
X/****************************************************************************
X
X    FUNCTION: BinPrintWndProc(HWND, unsigned, WORD, LONG)
X
X    PURPOSE:  Processes messages
X
X****************************************************************************/
X
Xlong FAR PASCAL BinPrintWndProc(hWnd, message, wParam, lParam)
XHWND hWnd;
Xunsigned message;
XWORD wParam;
XLONG lParam;
X{
X    FARPROC  lpOpenDlg;
X    HMENU    hMenu;
X
X    switch (message) {
X        case WM_COMMAND:
X	    switch (wParam) {
X		case IDM_PRINT:
X
X		    /* Call OpenDlg() to get the filename */
X
X                    if(!inProgress){
X		        lpOpenDlg = MakeProcInstance((FARPROC) OpenDlg, hInst);
X		        DialogBox(hInst, "Open", hWnd, lpOpenDlg);
X		        FreeProcInstance(lpOpenDlg);
X   	                if(isfilevalid){
X                             pleaseCancel = 0;
X                             inProgress = 1;
X                             hMenu = GetMenu(hWnd);
X                             EnableMenuItem(hMenu,0,MF_GRAYED | MF_BYPOSITION);
X                             DrawMenuBar(hWnd);
X                             PrintTheFile(hWnd); 
X                             EnableMenuItem(hMenu,0,MF_ENABLED | MF_BYPOSITION);
X                             DrawMenuBar(hWnd);
X                             inProgress = 0; 
X                        }
X                    }
X		    break;  
X
X		case IDM_CANCEL:
X		    if(inProgress)pleaseCancel = 1;
X		    break;  
X
X		case IDM_EXIT:
X		    DestroyWindow(hWnd);
X		    break;
X    
X	    }
X	    break;
X
X	case WM_DESTROY:
X	    PostQuitMessage(NULL);
X	    break;
X
X	default:
X	    return(DefWindowProc(hWnd, message, wParam, lParam));
X    }
X    return(NULL);
X}
X
X/****************************************************************************
X
X    FUNCTION: OpenDlg(HWND, unsigned, WORD, LONG)
X
X    PURPOSE: Let user select a file, and open it.
X
X    COMMENTS:
X
X	Get selection, which may be either a prefix to a new search path or
X	a filename.  DlgDirSelect parses selection, and appends a backslash
X	if selection is a prefix.
X
X****************************************************************************/
X
XHANDLE FAR PASCAL OpenDlg(hDlg, message, wParam, lParam)
XHWND hDlg;
Xunsigned message;
XWORD wParam;
XLONG lParam;
X{
X    WORD index;			   /* index to the filenames in the list box */
X    PSTR pTptr;			   /* temporary pointer			     */
X    HANDLE hFile;		   /* handle to the opened file		     */
X
X    switch (message) {
X	case WM_COMMAND:
X	    switch (wParam) {
X
X		case ID_LISTBOX:
X		    switch (HIWORD(lParam)) {
X
X			/* If the user clicks on a file in the list box, then
X			 * check to see if if a directory or a file is selected.
X			 * If it is a file, then update the ID_EDIT control
X			 * which contains the current filename.	 If it's a
X			 * directory, then update the default filespec, and
X			 * update the list box.
X			 */
X
X			case LBN_SELCHANGE:
X			    if (!DlgDirSelect(hDlg, str, ID_LISTBOX)) {
X
X				/* update filename selection */
X
X				SetDlgItemText(hDlg, ID_EDIT, str);
X				SendDlgItemMessage(hDlg, ID_EDIT, EM_SETSEL,
X				    NULL, MAKELONG(0, 0x7fff));
X			    }
X			    else {
X
X				/* update directory selection */
X
X				strcat(str, DefSpec);
X				DlgDirList(hDlg, str, ID_LISTBOX,
X				    ID_PATH, 0x4010);
X			    }
X			    break;
X
X			/* If the mouse is double clicked, then treat it as
X			 * if the "OK" box was selected.  The first click will
X			 * have updated the Edit control.
X			 */
X
X			case LBN_DBLCLK:
X			    goto openfile;
X		    }				     /* Ends ID_LISTBOX case */
X		    return(TRUE);
X
X		case IDOK:
Xopenfile:
X		    /* Get the filename from the edit control */
X
X		    GetDlgItemText(hDlg, ID_EDIT, OpenName, 128);
X
X		    /* Check for a wildcard; if found, set up a new search
X		     * path.
X		     */
X
X		    if (strchr(OpenName, '*') || strchr(OpenName, '?')) {
X
X			/* Separate filename from path.	 The path is stored
X			 * in str, which is discarded if null, else it is used
X			 * for a new search path.
X			 */
X
X			SeparateFile(hDlg, (LPSTR) str, (LPSTR) DefSpec,
X			    (LPSTR) OpenName);
X			if (str[0])
X			    strcpy(DefPath, str);
X
X			/* ChangeDefExt checks to see if the user requested a
X			 * new extension (*.ext) and if so, it updates the
X			 * DefExt string.
X			 */
X
X			ChangeDefExt(DefExt, DefSpec);
X			UpdateListBox(hDlg);
X			return(TRUE);
X		    }
X
X		    /* Ignore it if no filename is specified */
X
X		    if (!OpenName[0]) {
X			MessageBox(hDlg, "No filename specified.",
X			    NULL, MB_OK | MB_ICONQUESTION);
X			return(TRUE);
X		    }
X
X		    /* Append the default extension if needed */
X
X		    AddExt(OpenName, DefExt);
X
X                    isfilevalid = 1;
X		    EndDialog(hDlg, NULL);
X		    return(TRUE);
X
X		case IDCANCEL:
X
X                    isfilevalid = 0;           
X		    EndDialog(hDlg, NULL);
X		    return(TRUE);
X	    }
X	    break;
X
X	case WM_INITDIALOG:			   /* Request to initalize   */
X	    UpdateListBox(hDlg);
X	    SetDlgItemText(hDlg, ID_EDIT, DefSpec);
X	    SendDlgItemMessage(hDlg,		   /* dialog handle	     */
X		ID_EDIT,			   /* where to send message  */
X		EM_SETSEL,			   /* select characters	     */
X		NULL,				   /* additional information */
X		MAKELONG(0, 0x7fff));		   /* Accept entire contents */
X
X	    /* Set the focus to the Edit control so the user can type in a
X	     * filename without having to click on the Edit control first.
X	     */
X
X	    SetFocus(GetDlgItem(hDlg, ID_EDIT));
X	    return (FALSE);	  /* Indicates the focus is set to a control */
X    }
X    return FALSE;
X}
X
X/****************************************************************************
X
X    FUNCTION: UpdateListBox(HWND);
X
X    PURPOSE: Update the list box of OpenDlg
X
X    COMMENTS:
X
X	This function is called to update both the list box and the edit
X	control within the OpenDlg box.	 It combines the default path and
X	default filespec and uses them to update the list box.
X
X****************************************************************************/
X
Xvoid UpdateListBox(hDlg)
XHWND hDlg;
X{
X    strcpy(str, DefPath);
X    strcat(str, DefSpec);
X    DlgDirList(hDlg, str, ID_LISTBOX, ID_PATH, 0x4010);
X    SetDlgItemText(hDlg, ID_EDIT, DefSpec);
X}
X
X/****************************************************************************
X
X    FUNCTION: ChangeDefExt(PSTR, PSTR);
X
X    PURPOSE: Change the default extension
X
X    COMMENTS:
X
X	Check the Name to see if it contains a new extension, and if so,
X	change the default extension passed as a paramter.  If there are
X	any wildcards after the '.', then the default extension will
X	remain unchanged.
X
X****************************************************************************/
X
Xvoid ChangeDefExt(Ext, Name)
XPSTR Ext, Name;
X{
X    PSTR pTptr;
X
X    pTptr = Name;
X    while (*pTptr && *pTptr != '.')
X	pTptr++;
X    if (*pTptr)				     /* true if this is an extension */
X	if (!strchr(pTptr, '*') && !strchr(pTptr, '?'))
X	    strcpy(Ext, pTptr);		     /* Copies the extension	     */
X}
X
X/****************************************************************************
X
X    FUNCTION: SeparateFile(HWND, LPSTR, LPSTR, LPSTR);(PSTR, PSTR)
X
X    PURPOSE: Separate filename from pathname
X
X    COMMENTS:
X
X	This function takes a source filespec and splits it into a path and
X	a filename, and copies these into the strings specified.  Because it
X	uses the AnsiPrev call, it will work in any language.
X
X****************************************************************************/
X
Xvoid SeparateFile(hDlg, lpDestPath, lpDestFileName, lpSrcFileName)
XHWND hDlg;
XLPSTR lpDestPath, lpDestFileName, lpSrcFileName;
X{
X    LPSTR lpTmp;
X
X    /* Set lpTmp to the end of the filename, then backup until a path
X     * delimiter is found, or the beginning of the string is reached.
X     */
X
X    lpTmp = lpSrcFileName + (long) _lstrlen(lpSrcFileName);
X
X    while (*lpTmp != ':' && *lpTmp != '\\' && lpTmp > lpSrcFileName)
X	lpTmp = AnsiPrev(lpSrcFileName, lpTmp);
X
X    if (*lpTmp != ':' && *lpTmp != '\\') {
X
X	/* No path delimiter was found, so the original filename is copied to
X	 * the destination filename, and the destination path is zeroed.
X	 */
X
X	_lstrcpy(lpDestFileName, lpSrcFileName);
X	lpDestPath[0] = 0;
X	return;
X    }
X
X    /* A path delimiter was found.  Copy the text to the right of the
X     * delimiter to the destination filename, and copy the text to the left of
X     * the delimiter to the destination pathname.
X     */
X
X    _lstrcpy(lpDestFileName, lpTmp + 1L);
X    _lstrncpy(lpDestPath, lpSrcFileName, (int) (lpTmp - lpSrcFileName) + 1);
X    lpDestPath[(lpTmp - lpSrcFileName) + 1] = 0;
X}
X
X/****************************************************************************
X
X    FUNCTION: AddExt(PSTR, PSTR);
X
X    PURPOSE: Add default extension
X
X    COMMENTS:
X
X	Check the filename to see if a '.' was specified.  If not, then add
X	the extension.
X
X/***************************************************************************/
X
Xvoid AddExt(Name, Ext)
XPSTR Name, Ext;
X{
X    PSTR pTptr;
X
X    pTptr = Name;
X    while (*pTptr && *pTptr != '.')
X	pTptr++;
X    if (*pTptr != '.')			 /* If no extension, add the default */
X	strcat(Name, Ext);
X}
X
X/****************************************************************************
X
X    FUNCTION: _lstrlen(LPSTR)
X
X    PURPOSE:  uses a long far pointer to the string, returns the length
X
X    COMMENTS:
X
X	Because you are compiling with the short model, the normal string
X	handling functions will not handle far pointers.  This function
X	would be unneccesary if compiled using a medium or larger model.
X
X****************************************************************************/
X
Xint _lstrlen(lpStr)
XLPSTR lpStr;
X{
X    int i;
X    for (i = 0; *lpStr++; i++);		    /* Gets length using far pointer */
X    return(i);
X}
X
X/****************************************************************************
X
X    FUNCTION: _lstrncpy(LPSTR, LPSTR)
X
X    PURPOSE:  FAR version of strncpy()
X
X****************************************************************************/
X
Xvoid _lstrncpy(lpDest, lpSrc, n)
XLPSTR lpDest, lpSrc;
Xint n;
X{
X    while (n--)
X	if (!(*lpDest++ = *lpSrc++))
X	    return;
X}
X
X/****************************************************************************
X
X    FUNCTION: _lstrcpy(LPSTR, LPSTR)
X
X    PURPOSE:  FAR version of strcpy()
X
X****************************************************************************/
X
Xvoid _lstrcpy(lpDest, lpSrc)
XLPSTR lpDest, lpSrc;
X{
X    while(*lpDest++ = *lpSrc++);
X}
X
X/****************************************************************************
X
X   This function actually sends the file to the printer.
X   It has not been proven to be bug-free.
X
X****************************************************************************/
X
Xvoid *memmove(void *, void *, int);
X
Xvoid PrintTheFile(hWnd)
XHWND hWnd;
X{
X    OFSTRUCT of;
X    MSG msg;
X    int hfile;
X    FILE *stream;
X    int nComm, i, j, ierr, iwrit;
X    COMSTAT comstat;
X    char xbuf[514];
X    int iz;
X
X    if((hfile = OpenFile((LPSTR)OpenName,&of,OF_READ)) == -1) {
X        MessageBox(hWnd, "File Open Failed", (LPSTR) NULL, MB_OK);
X        return ;
X    }
X    if((stream = fdopen(hfile,"rb")) == NULL) {
X        MessageBox(hWnd, "File Open Failed", (LPSTR) NULL, MB_OK);
X        return ;
X    }
X    if((nComm = OpenComm("LPT1",32,128)) < 0) {
X        MessageBox(hWnd, "LPT1 Open Failed", (LPSTR) NULL, MB_OK);
X        return ;
X    }
X    FlushComm(nComm,0);
X
X    while(1){
X       iz = 0;
X       do{
X          if((j = fgetc(stream)) == EOF)break;
X          xbuf[iz++] = j;
X       }while(iz < 512);
X       if (iz == 0)break;
X       while(1) {
X           while(1){
X              ierr = GetCommError(nComm,&comstat);
X              if(ierr == CE_OOP || comstat.cbOutQue != 0){
X                  if(PeekMessage(&msg,NULL,0,0,PM_REMOVE ) != 0){       
X                      TranslateMessage(&msg);
X                      DispatchMessage(&msg);
X                      if(pleaseCancel)goto zapout;
X                  }
X              } else break;
X           }
X           iwrit = WriteComm(nComm,(LPSTR)xbuf,iz);
X           if(PeekMessage(&msg,NULL,0,0,PM_REMOVE ) != 0){       
X               TranslateMessage(&msg);
X               DispatchMessage(&msg);
X               if(pleaseCancel)goto zapout;
X           }
X           if(iwrit == iz) break;
X           iwrit = abs(iwrit);   
X           (void)memmove(xbuf,&xbuf[iwrit],iz-iwrit);
X           iz -= iwrit;
X       }
X    }
X
Xzapout:   /* I consider at least one goto per program a necessity */
X    FlushComm(nComm,0);
X    CloseComm(nComm);
X    close(hfile);
X
X}
X
END_OF_binprint.c
if test 15574 -ne `wc -c <binprint.c`; then
    echo shar: \"binprint.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f binprint.rc -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"binprint.rc\"
else
echo shar: Extracting \"binprint.rc\" \(577 characters\)
sed "s/^X//" >binprint.rc <<'END_OF_binprint.rc'
X#include "windows.h"
X#include "binprint.h"
X
XBinPrint MENU
XBEGIN
X    MENUITEM "&Print",  IDM_PRINT
X    MENUITEM "&Cancel", IDM_CANCEL
X    MENUITEM "&eXit",   IDM_EXIT
XEND
X
X
XOpen DIALOG 10, 10, 148, 112
XSTYLE WS_DLGFRAME | WS_POPUP
XBEGIN
X	LTEXT "Open File &Name:", ID_FILENAME,	4,  4,	60, 10
X	EDITTEXT ID_EDIT,		 4, 16, 100, 12, ES_AUTOHSCROLL
X	LTEXT "&Files in", ID_FILES,	 4, 40,	 32, 10
X	LISTBOX, ID_LISTBOX,		 4, 52,	 70, 56, WS_TABSTOP
X	LTEXT "",  ID_PATH,		40, 40, 100, 10
X	DEFPUSHBUTTON "&Open" , IDOK,	87, 60,	 50, 14
X	PUSHBUTTON "Cancel", IDCANCEL,	87, 80,	 50, 14
XEND
X
END_OF_binprint.rc
if test 577 -ne `wc -c <binprint.rc`; then
    echo shar: \"binprint.rc\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f binprint.def -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"binprint.def\"
else
echo shar: Extracting \"binprint.def\" \(206 characters\)
sed "s/^X//" >binprint.def <<'END_OF_binprint.def'
X
XNAME    BinPrint
X
XDESCRIPTION 'Prints Binary Files'
X
XSTUB    'WINSTUB.EXE'
X
XCODE    MOVEABLE
XDATA    MOVEABLE MULTIPLE
X
XHEAPSIZE  1024
XSTACKSIZE 4096
X
XEXPORTS
X    BinPrintWndProc @1
X    OpenDlg         @2
END_OF_binprint.def
if test 206 -ne `wc -c <binprint.def`; then
    echo shar: \"binprint.def\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f binprint.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"binprint.h\"
else
echo shar: Extracting \"binprint.h\" \(641 characters\)
sed "s/^X//" >binprint.h <<'END_OF_binprint.h'
X#define     IDM_PRINT    104
X#define     IDM_EXIT     105
X#define     IDM_CANCEL    106
X
X
X#define     ID_FILENAME  400
X#define     ID_EDIT      401
X#define     ID_FILES     402
X#define     ID_PATH      403
X#define     ID_LISTBOX   404
X
Xint PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
XBOOL BinPrintInit(HANDLE);
Xlong FAR PASCAL BinPrintWndProc(HWND, unsigned, WORD, LONG);
XHANDLE FAR PASCAL OpenDlg(HWND, unsigned, WORD, LONG);
Xvoid UpdateListBox(HWND);
Xvoid SeparateFile(HWND, LPSTR, LPSTR, LPSTR);
Xvoid AddExt(PSTR, PSTR);
Xvoid ChangeDefExt(PSTR, PSTR);
Xvoid _lstrcpy(LPSTR, LPSTR);
Xvoid _lstrncpy(LPSTR, LPSTR, int);
Xint  _lstrlen(LPSTR);
END_OF_binprint.h
if test 641 -ne `wc -c <binprint.h`; then
    echo shar: \"binprint.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f mcomp.bat -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"mcomp.bat\"
else
echo shar: Extracting \"mcomp.bat\" \(109 characters\)
sed "s/^X//" >mcomp.bat <<'END_OF_mcomp.bat'
Xcl /c /Gsw /Zp /Os binprint.c
Xlink4 binprint /noe,/al:16,,/nodef  slibcew slibw,binprint.def;
Xrc binprint.rc
END_OF_mcomp.bat
if test 109 -ne `wc -c <mcomp.bat`; then
    echo shar: \"mcomp.bat\" unpacked with wrong size!
fi
chmod +x mcomp.bat
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0