[xiph-cvs] cvs commit: ao/win32/src dlfcn.c readdir.c uiutil.c

Chris Wolf cwolf at xiph.org
Wed Sep 5 12:10:02 PDT 2001



cwolf       01/09/05 12:10:01

  Added:       win32    .cvsignore README.win32 all.dsp all.dsw all.opt
                        ao.def ao.dep ao.dsp ao.dsw ao.mak build_all.bat
                        clean_all.bat clean_dist.bat example.dep
                        example.dsp example.mak exmaple.dep exmaple.mak
                        install.bat prebuild.bat
               win32/include dirent.h dlfcn.h os_types.h readdir.h.bak
                        uiutil.h
               win32/src dlfcn.c readdir.c uiutil.c
  Log:
  Add support for win32

Revision  Changes    Path
1.1                  ao/win32/.cvsignore

Index: .cvsignore
===================================================================
Debug
Release
lib
ao.opt
example.opt
*.ncb
*.plg

1.1                  ao/win32/README.win32

Index: README.win32
===================================================================
$Id: README.win32,v 1.1 2001/09/05 19:09:57 cwolf Exp $
$Name:  $

Win32 port of libao, September 2001,  Chris Wolf <cwolf at starclass.com>
===========================================================================
This is the win32 port of the libao library and example program.
It has only been tested using MSVC v6, sp5 on Windows 2000 server, but
should build on other win32 platforms as long as MCVC v6 is used.

BUILDING

  Command line build:
  Before building, "prebuild.bat" should be called to create 
  working directories. 

  The libraries and executables may be built by invoking "build_all.bat".

  Note that the makefiles are generated from the IDE, and are thus a
  reflection of the workspace and project file states.  It is strongly
  recommended to make changes via the IDE and export the makefiles,
  rather than tweaking the makefiles directly.

  IDE build:
  Load the "all.dsw" workspace.  This workspace loads and manages the
  the dependent project files.  To perform a build, from the "build"
  menu, select the "build" menu item.

  

DIRECTORIES

  Debug and release versions of both the static and dynamic (DLL) libraries
  will be created in the win32/lib directory.

  The debug and release versions of the statically and dynamically linked
  versions of the executables will be created in the following directories:

  Debug/bin/static
  Debug/bin/dynamic
  Release/bin/static
  Release/bin/dynamic

  N.B. In order to execute the dynamically linked executables, the
       corresponding DLL's must be in the PATH.  There are two options:

       1.) put the fully qualified path of "win32/lib" in the PATH.

LIBRARY NAMING CONVENTIONS

  There is an ambiguity with Microsoft's naming convention; a file with
  a "*.lib" extension could either be a static library, or a DLL export
  library, therefore the following naming convention is adopted to resolve
  the ambiguity:

  Static Library:      BASENAME_static.lib   e.g. ao_static.lib
  DLL export Library:  BASENAME.lib          e.g. ao.lib

  In addition, appending "_d" to the basename denotes a debug version of
  the library. e.g. ao_static_d.lib, ao_d.dll

  The module definition file (ao.def) does not explicitly name
  the library, to allow the linker to set the name based on the
  type of build.

1.1                  ao/win32/all.dsp

Index: all.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="all" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Generic Project" 0x010a

CFG=all - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "all.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "all.mak" CFG="all - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "all - Win32 Release" (based on "Win32 (x86) Generic Project")
!MESSAGE "all - Win32 Debug" (based on "Win32 (x86) Generic Project")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
MTL=midl.exe

!IF  "$(CFG)" == "all - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""

!ELSEIF  "$(CFG)" == "all - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "all___Win32_Debug"
# PROP BASE Intermediate_Dir "all___Win32_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug/all"
# PROP Intermediate_Dir "Debug/all"
# PROP Target_Dir ""

!ENDIF 

# Begin Target

# Name "all - Win32 Release"
# Name "all - Win32 Debug"
# End Target
# End Project

1.1                  ao/win32/all.dsw

Index: all.dsw
===================================================================
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!

###############################################################################

Project: "all"=.\all.dsp - Package Owner=<4>

Package=<5>
{{{
}}}

Package=<4>
{{{
    Begin Project Dependency
    Project_Dep_Name example
    End Project Dependency
}}}

###############################################################################

Project: "ao"=.\ao.dsp - Package Owner=<4>

Package=<5>
{{{
}}}

Package=<4>
{{{
    Begin Project Dependency
    Project_Dep_Name dsound
    End Project Dependency
}}}

###############################################################################

Project: "dsound"=..\src\plugins\dsound\dsound.dsp - Package Owner=<4>

Package=<5>
{{{
}}}

Package=<4>
{{{
}}}

###############################################################################

Project: "example"=.\example.dsp - Package Owner=<4>

Package=<5>
{{{
}}}

Package=<4>
{{{
    Begin Project Dependency
    Project_Dep_Name ao
    End Project Dependency
    Begin Project Dependency
    Project_Dep_Name dsound
    End Project Dependency
}}}

###############################################################################

Global:

Package=<5>
{{{
}}}

Package=<3>
{{{
}}}

###############################################################################

1.1                  ao/win32/all.opt

Index: all.opt
===================================================================
ÐÏࡱ

1.1                  ao/win32/ao.def

Index: ao.def
===================================================================
;------------------------------------------------------------------------
; $Id: ao.def,v 1.1 2001/09/05 19:09:57 cwolf Exp $
; $Name:  $
;
; Win32 port, September 2001 Chris Wolf
;------------------------------------------------------------------------
;
; This should be kept syncronized with the publicly exposed API
; defined by ao.h
;
LIBRARY
; Don't explicitly name DLL here, let the linker do it.
;
DESCRIPTION "Entry points for libao"
;
EXPORTS

ao_append_option
ao_close
ao_default_driver_id
ao_driver_id
ao_driver_info
ao_driver_info_list
ao_free_options
ao_initialize
ao_is_big_endian
ao_open_file
ao_open_live
ao_play
ao_shutdown

1.1                  ao/win32/ao.dep

Index: ao.dep
===================================================================
# Microsoft Developer Studio Generated Dependency File, included by ao.mak

..\src\ao_au.c : \
        "..\include\ao\ao.h"\
        "..\include\ao\plugin.h"\
        ".\include\os_types.h"\
        

..\src\ao_null.c : \
        "..\include\ao\ao.h"\
        ".\include\os_types.h"\
        

..\src\ao_raw.c : \
        "..\include\ao\ao.h"\
        "..\include\ao\plugin.h"\
        ".\include\os_types.h"\
        

..\src\ao_wav.c : \
        "..\include\ao\ao.h"\
        ".\include\os_types.h"\
        

..\src\audio_out.c : \
        "..\include\ao\ao.h"\
        "..\src\ao_private.h"\
        ".\include\dirent.h"\
        ".\include\dlfcn.h"\
        ".\include\os_types.h"\
        

..\src\config.c : \
        "..\src\ao_private.h"\
        

.\src\dlfcn.c : \
        "..\..\..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
        ".\include\dlfcn.h"\
        ".\include\os_types.h"\
        

.\src\readdir.c : \
        ".\include\dirent.h"\
        

1.1                  ao/win32/ao.dsp

Index: ao.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="ao" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

CFG=ao - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "ao.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "ao.mak" CFG="ao - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "ao - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ao - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

!IF  "$(CFG)" == "ao - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release/dynlib"
# PROP Intermediate_Dir "Release/dynlib"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "AO_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../include" /I "../win32/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"lib/ao.dll"
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=copy export lib
PostBuild_Cmds=echo on	copy Release\dynlib\ao.lib .\lib
# End Special Build Tool

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug/dynlib"
# PROP Intermediate_Dir "Debug/dynlib"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "AO_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../include" /I "../win32/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"lib/ao_d.dll" /pdbtype:sept
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=echo on	copy Debug\dynlib\ao_d.lib .\lib
# End Special Build Tool

!ENDIF 

# Begin Target

# Name "ao - Win32 Release"
# Name "ao - Win32 Debug"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

SOURCE=..\src\ao_au.c

!IF  "$(CFG)" == "ao - Win32 Release"

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

# SUBTRACT CPP /YX

!ENDIF 

# End Source File
# Begin Source File

SOURCE=..\src\ao_null.c
# End Source File
# Begin Source File

SOURCE=..\src\ao_raw.c
# End Source File
# Begin Source File

SOURCE=..\src\ao_wav.c
# End Source File
# Begin Source File

SOURCE=..\src\audio_out.c
# End Source File
# Begin Source File

SOURCE=..\src\config.c
# End Source File
# Begin Source File

SOURCE=.\src\dlfcn.c
# End Source File
# Begin Source File

SOURCE=.\src\readdir.c
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File

SOURCE=..\include\ao\ao.h
# End Source File
# Begin Source File

SOURCE=..\src\ao_private.h
# End Source File
# Begin Source File

SOURCE=.\include\dlfcn.h
# End Source File
# Begin Source File

SOURCE=.\include\os_types.h
# End Source File
# Begin Source File

SOURCE=..\include\ao\plugin.h
# End Source File
# Begin Source File

SOURCE=.\include\readdir.h
# End Source File
# End Group
# Begin Group "Other Files"

# PROP Default_Filter "*.def"
# Begin Source File

SOURCE=.\ao.def
# End Source File
# End Group
# End Target
# End Project

1.1                  ao/win32/ao.dsw

Index: ao.dsw
===================================================================
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!

###############################################################################

Project: "ao"=.\ao.dsp - Package Owner=<4>

Package=<5>
{{{
}}}

Package=<4>
{{{
}}}

###############################################################################

Global:

Package=<5>
{{{
}}}

Package=<3>
{{{
}}}

###############################################################################

1.1                  ao/win32/ao.mak

Index: ao.mak
===================================================================
# Microsoft Developer Studio Generated NMAKE File, Based on ao.dsp
!IF "$(CFG)" == ""
CFG=ao - Win32 Debug
!MESSAGE No configuration specified. Defaulting to ao - Win32 Debug.
!ENDIF 

!IF "$(CFG)" != "ao - Win32 Release" && "$(CFG)" != "ao - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "ao.mak" CFG="ao - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "ao - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ao - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE 
!ERROR An invalid configuration is specified.
!ENDIF 

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE 
NULL=nul
!ENDIF 

CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

!IF  "$(CFG)" == "ao - Win32 Release"

OUTDIR=.\Release/dynlib
INTDIR=.\Release/dynlib

!IF "$(RECURSE)" == "0" 

ALL : ".\lib\ao.dll"

!ELSE 

ALL : "dsound - Win32 Release" ".\lib\ao.dll"

!ENDIF 

!IF "$(RECURSE)" == "1" 
CLEAN :"dsound - Win32 ReleaseCLEAN" 
!ELSE 
CLEAN :
!ENDIF 
        - at erase "$(INTDIR)\ao_au.obj"
        - at erase "$(INTDIR)\ao_null.obj"
        - at erase "$(INTDIR)\ao_raw.obj"
        - at erase "$(INTDIR)\ao_wav.obj"
        - at erase "$(INTDIR)\audio_out.obj"
        - at erase "$(INTDIR)\config.obj"
        - at erase "$(INTDIR)\dlfcn.obj"
        - at erase "$(INTDIR)\readdir.obj"
        - at erase "$(INTDIR)\vc60.idb"
        - at erase "$(OUTDIR)\ao.exp"
        - at erase "$(OUTDIR)\ao.lib"
        - at erase ".\lib\ao.dll"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../include" /I "../win32/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\ao.bsc" 
BSC32_SBRS= \
        
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\ao.pdb" /machine:I386 /def:".\ao.def" /out:"lib/ao.dll" /implib:"$(OUTDIR)\ao.lib" 
DEF_FILE= \
        ".\ao.def"
LINK32_OBJS= \
        "$(INTDIR)\ao_au.obj" \
        "$(INTDIR)\ao_null.obj" \
        "$(INTDIR)\ao_raw.obj" \
        "$(INTDIR)\ao_wav.obj" \
        "$(INTDIR)\audio_out.obj" \
        "$(INTDIR)\config.obj" \
        "$(INTDIR)\dlfcn.obj" \
        "$(INTDIR)\readdir.obj"

".\lib\ao.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

SOURCE="$(InputPath)"
PostBuild_Desc=copy export lib
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep

ALL : $(DS_POSTBUILD_DEP)

$(DS_POSTBUILD_DEP) : "dsound - Win32 Release" ".\lib\ao.dll"
   echo on
        copy Release\dynlib\ao.lib .\lib
        echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

OUTDIR=.\Debug/dynlib
INTDIR=.\Debug/dynlib
# Begin Custom Macros
OutDir=.\Debug/dynlib
# End Custom Macros

!IF "$(RECURSE)" == "0" 

ALL : ".\lib\ao_d.dll" "$(OUTDIR)\ao.bsc"

!ELSE 

ALL : "dsound - Win32 Debug" ".\lib\ao_d.dll" "$(OUTDIR)\ao.bsc"

!ENDIF 

!IF "$(RECURSE)" == "1" 
CLEAN :"dsound - Win32 DebugCLEAN" 
!ELSE 
CLEAN :
!ENDIF 
        - at erase "$(INTDIR)\ao_au.obj"
        - at erase "$(INTDIR)\ao_au.sbr"
        - at erase "$(INTDIR)\ao_null.obj"
        - at erase "$(INTDIR)\ao_null.sbr"
        - at erase "$(INTDIR)\ao_raw.obj"
        - at erase "$(INTDIR)\ao_raw.sbr"
        - at erase "$(INTDIR)\ao_wav.obj"
        - at erase "$(INTDIR)\ao_wav.sbr"
        - at erase "$(INTDIR)\audio_out.obj"
        - at erase "$(INTDIR)\audio_out.sbr"
        - at erase "$(INTDIR)\config.obj"
        - at erase "$(INTDIR)\config.sbr"
        - at erase "$(INTDIR)\dlfcn.obj"
        - at erase "$(INTDIR)\dlfcn.sbr"
        - at erase "$(INTDIR)\readdir.obj"
        - at erase "$(INTDIR)\readdir.sbr"
        - at erase "$(INTDIR)\vc60.idb"
        - at erase "$(INTDIR)\vc60.pdb"
        - at erase "$(OUTDIR)\ao.bsc"
        - at erase "$(OUTDIR)\ao_d.exp"
        - at erase "$(OUTDIR)\ao_d.lib"
        - at erase "$(OUTDIR)\ao_d.pdb"
        - at erase ".\lib\ao_d.dll"
        - at erase ".\lib\ao_d.ilk"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../include" /I "../win32/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\ao.bsc" 
BSC32_SBRS= \
        "$(INTDIR)\ao_au.sbr" \
        "$(INTDIR)\ao_null.sbr" \
        "$(INTDIR)\ao_raw.sbr" \
        "$(INTDIR)\ao_wav.sbr" \
        "$(INTDIR)\audio_out.sbr" \
        "$(INTDIR)\config.sbr" \
        "$(INTDIR)\dlfcn.sbr" \
        "$(INTDIR)\readdir.sbr"

"$(OUTDIR)\ao.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
    $(BSC32) @<<
  $(BSC32_FLAGS) $(BSC32_SBRS)
<<

LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\ao_d.pdb" /debug /machine:I386 /def:".\ao.def" /out:"lib/ao_d.dll" /implib:"$(OUTDIR)\ao_d.lib" /pdbtype:sept 
DEF_FILE= \
        ".\ao.def"
LINK32_OBJS= \
        "$(INTDIR)\ao_au.obj" \
        "$(INTDIR)\ao_null.obj" \
        "$(INTDIR)\ao_raw.obj" \
        "$(INTDIR)\ao_wav.obj" \
        "$(INTDIR)\audio_out.obj" \
        "$(INTDIR)\config.obj" \
        "$(INTDIR)\dlfcn.obj" \
        "$(INTDIR)\readdir.obj"

".\lib\ao_d.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

SOURCE="$(InputPath)"
DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep

ALL : $(DS_POSTBUILD_DEP)

# Begin Custom Macros
OutDir=.\Debug/dynlib
# End Custom Macros

$(DS_POSTBUILD_DEP) : "dsound - Win32 Debug" ".\lib\ao_d.dll" "$(OUTDIR)\ao.bsc"
   echo on
        copy Debug\dynlib\ao_d.lib .\lib
        echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"

!ENDIF 

.c{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.c{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("ao.dep")
!INCLUDE "ao.dep"
!ELSE 
!MESSAGE Warning: cannot find "ao.dep"
!ENDIF 
!ENDIF 

!IF "$(CFG)" == "ao - Win32 Release" || "$(CFG)" == "ao - Win32 Debug"
SOURCE=..\src\ao_au.c

!IF  "$(CFG)" == "ao - Win32 Release"

CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "../include" /I "../win32/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 

"$(INTDIR)\ao_au.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) @<<
  $(CPP_SWITCHES) $(SOURCE)
<<

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../include" /I "../win32/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 

"$(INTDIR)\ao_au.obj"	"$(INTDIR)\ao_au.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) @<<
  $(CPP_SWITCHES) $(SOURCE)
<<

!ENDIF 

SOURCE=..\src\ao_null.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\ao_null.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\ao_null.obj"	"$(INTDIR)\ao_null.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

SOURCE=..\src\ao_raw.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\ao_raw.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\ao_raw.obj"	"$(INTDIR)\ao_raw.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

SOURCE=..\src\ao_wav.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\ao_wav.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\ao_wav.obj"	"$(INTDIR)\ao_wav.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

SOURCE=..\src\audio_out.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\audio_out.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\audio_out.obj"	"$(INTDIR)\audio_out.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

SOURCE=..\src\config.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\config.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\config.obj"	"$(INTDIR)\config.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

SOURCE=.\src\dlfcn.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\dlfcn.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\dlfcn.obj"	"$(INTDIR)\dlfcn.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

SOURCE=.\src\readdir.c

!IF  "$(CFG)" == "ao - Win32 Release"

"$(INTDIR)\readdir.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"$(INTDIR)\readdir.obj"	"$(INTDIR)\readdir.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

!IF  "$(CFG)" == "ao - Win32 Release"

"dsound - Win32 Release" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Release" 
   cd "..\..\..\win32"

"dsound - Win32 ReleaseCLEAN" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Release" RECURSE=1 CLEAN 
   cd "..\..\..\win32"

!ELSEIF  "$(CFG)" == "ao - Win32 Debug"

"dsound - Win32 Debug" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Debug" 
   cd "..\..\..\win32"

"dsound - Win32 DebugCLEAN" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Debug" RECURSE=1 CLEAN 
   cd "..\..\..\win32"

!ENDIF 

!ENDIF 

1.1                  ao/win32/build_all.bat

Index: build_all.bat
===================================================================
rem echo off
rem $Id: build_all.bat,v 1.1 2001/09/05 19:09:57 cwolf Exp $
rem
rem Builds all targets.
rem
rem Only need to call example.mak, dependencies will build the other
rem targets.
rem
echo on
nmake -f example.mak CFG="example - Win32 Debug"
nmake -f example.mak CFG="example - Win32 Release"

1.1                  ao/win32/clean_all.bat

Index: clean_all.bat
===================================================================
rem echo off
rem $Id: clean_all.bat,v 1.1 2001/09/05 19:09:57 cwolf Exp $
rem
rem Builds all targets.
rem
rem Only need to call example.mak, dependencies will build the other
rem targets.
rem
echo on
nmake -f example.mak CFG="example - Win32 Debug" CLEAN
nmake -f example.mak CFG="example - Win32 Release" CLEAN

1.1                  ao/win32/clean_dist.bat

Index: clean_dist.bat
===================================================================
rem echo off
rem $Id: clean_dist.bat,v 1.1 2001/09/05 19:09:57 cwolf Exp $
rem
rem Only need to call example.mak, dependencies will build the other
rem targets.
echo on
del *.ncb
del *.plg
del ao.opt
del example.opt
rmdir /q /s lib
rmdir /q /s Debug
rmdir /q /s Release

1.1                  ao/win32/example.dep

Index: example.dep
===================================================================
# Microsoft Developer Studio Generated Dependency File, included by example.mak

..\doc\ao_example.c : \
        "..\include\ao\ao.h"\
        ".\include\os_types.h"\
        

1.1                  ao/win32/example.dsp

Index: example.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Console Application" 0x0103

CFG=example - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "example.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "example - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe

!IF  "$(CFG)" == "example - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release/example"
# PROP Intermediate_Dir "Release/example"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "../include" /I "../win32/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"Release/bin/dynamic/ao_example.exe"

!ELSEIF  "$(CFG)" == "example - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "example___Win32_Debug"
# PROP BASE Intermediate_Dir "example___Win32_Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug/example"
# PROP Intermediate_Dir "Debug/example"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../include" /I "../win32/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ao_d.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/bin/dynamic/ao_example.exe" /pdbtype:sept /libpath:"./lib"
# SUBTRACT LINK32 /pdb:none

!ENDIF 

# Begin Target

# Name "example - Win32 Release"
# Name "example - Win32 Debug"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

SOURCE=..\doc\ao_example.c
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"

# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

1.1                  ao/win32/example.mak

Index: example.mak
===================================================================
# Microsoft Developer Studio Generated NMAKE File, Based on example.dsp
!IF "$(CFG)" == ""
CFG=example - Win32 Debug
!MESSAGE No configuration specified. Defaulting to example - Win32 Debug.
!ENDIF 

!IF "$(CFG)" != "example - Win32 Release" && "$(CFG)" != "example - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "example - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "example - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 
!ERROR An invalid configuration is specified.
!ENDIF 

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE 
NULL=nul
!ENDIF 

CPP=cl.exe
RSC=rc.exe

!IF  "$(CFG)" == "example - Win32 Release"

OUTDIR=.\Release/example
INTDIR=.\Release/example

!IF "$(RECURSE)" == "0" 

ALL : ".\Release\bin\dynamic\ao_example.exe"

!ELSE 

ALL : "dsound - Win32 Release" "ao - Win32 Release" ".\Release\bin\dynamic\ao_example.exe"

!ENDIF 

!IF "$(RECURSE)" == "1" 
CLEAN :"ao - Win32 ReleaseCLEAN" "dsound - Win32 ReleaseCLEAN" 
!ELSE 
CLEAN :
!ENDIF 
        - at erase "$(INTDIR)\ao_example.obj"
        - at erase "$(INTDIR)\vc60.idb"
        - at erase ".\Release\bin\dynamic\ao_example.exe"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "../include" /I "../win32/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\example.bsc" 
BSC32_SBRS= \
        
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\ao_example.pdb" /machine:I386 /out:"Release/bin/dynamic/ao_example.exe" 
LINK32_OBJS= \
        "$(INTDIR)\ao_example.obj" \
        ".\Release\dynlib\ao.lib"

".\Release\bin\dynamic\ao_example.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ELSEIF  "$(CFG)" == "example - Win32 Debug"

OUTDIR=.\Debug/example
INTDIR=.\Debug/example
# Begin Custom Macros
OutDir=.\Debug/example
# End Custom Macros

!IF "$(RECURSE)" == "0" 

ALL : ".\Debug\bin\dynamic\ao_example.exe" "$(OUTDIR)\example.bsc"

!ELSE 

ALL : "dsound - Win32 Debug" "ao - Win32 Debug" ".\Debug\bin\dynamic\ao_example.exe" "$(OUTDIR)\example.bsc"

!ENDIF 

!IF "$(RECURSE)" == "1" 
CLEAN :"ao - Win32 DebugCLEAN" "dsound - Win32 DebugCLEAN" 
!ELSE 
CLEAN :
!ENDIF 
        - at erase "$(INTDIR)\ao_example.obj"
        - at erase "$(INTDIR)\ao_example.sbr"
        - at erase "$(INTDIR)\vc60.idb"
        - at erase "$(INTDIR)\vc60.pdb"
        - at erase "$(OUTDIR)\ao_example.pdb"
        - at erase "$(OUTDIR)\example.bsc"
        - at erase ".\Debug\bin\dynamic\ao_example.exe"
        - at erase ".\Debug\bin\dynamic\ao_example.ilk"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /I "../include" /I "../win32/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\example.bsc" 
BSC32_SBRS= \
        "$(INTDIR)\ao_example.sbr"

"$(OUTDIR)\example.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
    $(BSC32) @<<
  $(BSC32_FLAGS) $(BSC32_SBRS)
<<

LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ao_d.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\ao_example.pdb" /debug /machine:I386 /out:"Debug/bin/dynamic/ao_example.exe" /pdbtype:sept /libpath:"./lib" 
LINK32_OBJS= \
        "$(INTDIR)\ao_example.obj" \
        ".\Debug\dynlib\ao_d.lib"

".\Debug\bin\dynamic\ao_example.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ENDIF 

.c{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.c{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("example.dep")
!INCLUDE "example.dep"
!ELSE 
!MESSAGE Warning: cannot find "example.dep"
!ENDIF 
!ENDIF 

!IF "$(CFG)" == "example - Win32 Release" || "$(CFG)" == "example - Win32 Debug"
SOURCE=..\doc\ao_example.c

!IF  "$(CFG)" == "example - Win32 Release"

"$(INTDIR)\ao_example.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "example - Win32 Debug"

"$(INTDIR)\ao_example.obj"	"$(INTDIR)\ao_example.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

!IF  "$(CFG)" == "example - Win32 Release"

"ao - Win32 Release" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Release" 
   cd "."

"ao - Win32 ReleaseCLEAN" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Release" RECURSE=1 CLEAN 
   cd "."

!ELSEIF  "$(CFG)" == "example - Win32 Debug"

"ao - Win32 Debug" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Debug" 
   cd "."

"ao - Win32 DebugCLEAN" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Debug" RECURSE=1 CLEAN 
   cd "."

!ENDIF 

!IF  "$(CFG)" == "example - Win32 Release"

"dsound - Win32 Release" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Release" 
   cd "..\..\..\win32"

"dsound - Win32 ReleaseCLEAN" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Release" RECURSE=1 CLEAN 
   cd "..\..\..\win32"

!ELSEIF  "$(CFG)" == "example - Win32 Debug"

"dsound - Win32 Debug" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Debug" 
   cd "..\..\..\win32"

"dsound - Win32 DebugCLEAN" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Debug" RECURSE=1 CLEAN 
   cd "..\..\..\win32"

!ENDIF 

!ENDIF 

1.1                  ao/win32/exmaple.dep

Index: exmaple.dep
===================================================================
# Microsoft Developer Studio Generated Dependency File, included by exmaple.mak

..\doc\ao_example.c : \
        "..\include\ao\ao.h"\
        ".\include\os_types.h"\
        

1.1                  ao/win32/exmaple.mak

Index: exmaple.mak
===================================================================
# Microsoft Developer Studio Generated NMAKE File, Based on exmaple.dsp
!IF "$(CFG)" == ""
CFG=exmaple - Win32 Debug
!MESSAGE No configuration specified. Defaulting to exmaple - Win32 Debug.
!ENDIF 

!IF "$(CFG)" != "exmaple - Win32 Release" && "$(CFG)" != "exmaple - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "exmaple.mak" CFG="exmaple - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "exmaple - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "exmaple - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 
!ERROR An invalid configuration is specified.
!ENDIF 

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE 
NULL=nul
!ENDIF 

CPP=cl.exe
RSC=rc.exe

!IF  "$(CFG)" == "exmaple - Win32 Release"

OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros

!IF "$(RECURSE)" == "0" 

ALL : "$(OUTDIR)\example\ao_exmaple.exe"

!ELSE 

ALL : "dsound - Win32 Release" "ao - Win32 Release" "$(OUTDIR)\example\ao_exmaple.exe"

!ENDIF 

!IF "$(RECURSE)" == "1" 
CLEAN :"ao - Win32 ReleaseCLEAN" "dsound - Win32 ReleaseCLEAN" 
!ELSE 
CLEAN :
!ENDIF 
        - at erase "$(INTDIR)\ao_example.obj"
        - at erase "$(INTDIR)\vc60.idb"
        - at erase "$(OUTDIR)\example\ao_exmaple.exe"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "../include" /I "../win32/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\exmaple.bsc" 
BSC32_SBRS= \
        
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\ao_exmaple.pdb" /machine:I386 /out:"$(OUTDIR)\example\ao_exmaple.exe" 
LINK32_OBJS= \
        "$(INTDIR)\ao_example.obj" \
        "$(OUTDIR)\ao.lib"

"$(OUTDIR)\example\ao_exmaple.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ELSEIF  "$(CFG)" == "exmaple - Win32 Debug"

OUTDIR=.\Debug/example
INTDIR=.\Debug/example
# Begin Custom Macros
OutDir=.\Debug/example
# End Custom Macros

!IF "$(RECURSE)" == "0" 

ALL : "$(OUTDIR)\ao_example.exe" "$(OUTDIR)\exmaple.bsc"

!ELSE 

ALL : "dsound - Win32 Debug" "ao - Win32 Debug" "$(OUTDIR)\ao_example.exe" "$(OUTDIR)\exmaple.bsc"

!ENDIF 

!IF "$(RECURSE)" == "1" 
CLEAN :"ao - Win32 DebugCLEAN" "dsound - Win32 DebugCLEAN" 
!ELSE 
CLEAN :
!ENDIF 
        - at erase "$(INTDIR)\ao_example.obj"
        - at erase "$(INTDIR)\ao_example.sbr"
        - at erase "$(INTDIR)\vc60.idb"
        - at erase "$(INTDIR)\vc60.pdb"
        - at erase "$(OUTDIR)\ao_example.exe"
        - at erase "$(OUTDIR)\ao_example.ilk"
        - at erase "$(OUTDIR)\ao_example.pdb"
        - at erase "$(OUTDIR)\exmaple.bsc"

"$(OUTDIR)" :
    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"

CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../win32/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\exmaple.bsc" 
BSC32_SBRS= \
        "$(INTDIR)\ao_example.sbr"

"$(OUTDIR)\exmaple.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
    $(BSC32) @<<
  $(BSC32_FLAGS) $(BSC32_SBRS)
<<

LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ao_d.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\ao_example.pdb" /debug /machine:I386 /out:"$(OUTDIR)\ao_example.exe" /pdbtype:sept /libpath:"./lib" 
LINK32_OBJS= \
        "$(INTDIR)\ao_example.obj" \
        ".\Debug\dynlib\ao_d.lib"

"$(OUTDIR)\ao_example.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
    $(LINK32) @<<
  $(LINK32_FLAGS) $(LINK32_OBJS)
<<

!ENDIF 

.c{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.obj::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.c{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cpp{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

.cxx{$(INTDIR)}.sbr::
   $(CPP) @<<
   $(CPP_PROJ) $< 
<<

!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("exmaple.dep")
!INCLUDE "exmaple.dep"
!ELSE 
!MESSAGE Warning: cannot find "exmaple.dep"
!ENDIF 
!ENDIF 

!IF "$(CFG)" == "exmaple - Win32 Release" || "$(CFG)" == "exmaple - Win32 Debug"
SOURCE=..\doc\ao_example.c

!IF  "$(CFG)" == "exmaple - Win32 Release"

"$(INTDIR)\ao_example.obj" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ELSEIF  "$(CFG)" == "exmaple - Win32 Debug"

"$(INTDIR)\ao_example.obj"	"$(INTDIR)\ao_example.sbr" : $(SOURCE) "$(INTDIR)"
        $(CPP) $(CPP_PROJ) $(SOURCE)

!ENDIF 

!IF  "$(CFG)" == "exmaple - Win32 Release"

"ao - Win32 Release" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Release" 
   cd "."

"ao - Win32 ReleaseCLEAN" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Release" RECURSE=1 CLEAN 
   cd "."

!ELSEIF  "$(CFG)" == "exmaple - Win32 Debug"

"ao - Win32 Debug" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Debug" 
   cd "."

"ao - Win32 DebugCLEAN" : 
   cd "."
   $(MAKE) /$(MAKEFLAGS) /F .\ao.mak CFG="ao - Win32 Debug" RECURSE=1 CLEAN 
   cd "."

!ENDIF 

!IF  "$(CFG)" == "exmaple - Win32 Release"

"dsound - Win32 Release" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Release" 
   cd "..\..\..\win32"

"dsound - Win32 ReleaseCLEAN" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Release" RECURSE=1 CLEAN 
   cd "..\..\..\win32"

!ELSEIF  "$(CFG)" == "exmaple - Win32 Debug"

"dsound - Win32 Debug" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Debug" 
   cd "..\..\..\win32"

"dsound - Win32 DebugCLEAN" : 
   cd "\src\codec\vorbis\ao\src\plugins\dsound"
   $(MAKE) /$(MAKEFLAGS) /F .\dsound.mak CFG="dsound - Win32 Debug" RECURSE=1 CLEAN 
   cd "..\..\..\win32"

!ENDIF 

!ENDIF 

1.1                  ao/win32/install.bat

Index: install.bat
===================================================================
rem echo off
rem $Id: install.bat,v 1.1 2001/09/05 19:09:57 cwolf Exp $
rem
rem Install script for win32 ao
setlocal
rem ---------------------------------------------------------
rem Alter these settings for your environment
set SRCBASE=c:\src\codec\vorbis
set DLLPATH=c:\opt\bin
set PLUGINPATH=c:\Program Files\Common Files\Xiphophorus\ao
rem ---------------------------------------------------------
echo on
copy %SRCBASE%\ao\win32\lib\ao_d.dll "%DLLPATH%"
copy %SRCBASE%\ao\win32\lib\ao.dll "%DLLPATH%"
copy %SRCBASE%\ao\win32\lib\dsound_d.dll "%PLUGINPATH%"
copy %SRCBASE%\ao\win32\lib\dsound.dll "%PLUGINPATH%"
endlocal

1.1                  ao/win32/prebuild.bat

Index: prebuild.bat
===================================================================
rem echo off
rem $Id: prebuild.bat,v 1.1 2001/09/05 19:09:57 cwolf Exp $
rem
echo on
mkdir lib
mkdir Debug\bin\dynamic
mkdir Debug\bin\static
mkdir Release\bin\dynamic
mkdir Release\bin\static

1.1                  ao/win32/include/dirent.h

Index: dirent.h
===================================================================
#ifndef _DIRENT_H
# define _DIRENT_H
/* 
 * $Id: dirent.h,v 1.1 2001/09/05 19:10:00 cwolf Exp $
 * $Name:  $
 * 
 * Portions copyright Apache Software Foundation
 *
 * Structures and types used to implement opendir/readdir/closedir 
 * on Windows 95/NT. 
 */ 
#include <io.h> 
#include <stdio.h> 
#include <stdlib.h> 
#include <sys/types.h> 

/* struct dirent - same as Unix */ 
struct dirent 
{
    long d_ino; /* inode (always 1 in WIN32) */ 
    off_t d_off; /* offset to this dirent */ 
    unsigned short d_reclen; /* length of d_name */ 
    char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ 
}; 

/* typedef DIR - not the same as Unix */ 
typedef struct 
{
    long handle; /* _findfirst/_findnext handle */ 
    short offset; /* offset into directory */ 
    short finished; /* 1 if there are not more files */ 
    struct _finddata_t fileinfo; /* from _findfirst/_findnext */ 
    char *dir; /* the dir we are reading */ 
    struct dirent dent; /* the dirent to return */ 
} DIR; 

/* Function prototypes */ 
DIR *opendir(char *); 
struct dirent *readdir(DIR *); 
int closedir(DIR *);

#define __S_ISTYPE(mode, mask)  (((mode) & _S_IFMT) == (mask))
#define S_ISREG(mode)    __S_ISTYPE((mode), _S_IFREG)

#endif /* _DIRENT_H */

1.1                  ao/win32/include/dlfcn.h

Index: dlfcn.h
===================================================================
#ifndef __DLFCN_H__
# define __DLFCN_H__
/*
 * $Id: dlfcn.h,v 1.1 2001/09/05 19:10:00 cwolf Exp $
 * $Name:  $
 * 
 *
 */
extern void *dlopen  (const char *file, int mode);
extern int   dlclose (void *handle);
extern void *dlsym   (void * handle, const char * name);
extern char *dlerror (void);

#define RTLD_NOW 0

#endif /* __DLFCN_H__ */

1.1                  ao/win32/include/os_types.h

Index: os_types.h
===================================================================
#ifndef __OS_TYPES_H__
#define __OS_TYPES_H__
/*
 * $Id: os_types.h,v 1.1 2001/09/05 19:10:00 cwolf Exp $
 * $Name:  $
 * 
 * win32 types 
 * 04 Sept 2001 - Chris Wolf create.
 */

typedef unsigned char			uint_8;
typedef unsigned short		uint_16;
typedef unsigned int			uint_32;
typedef signed   char			sint_32;
typedef signed   short		sint_16;
typedef signed   int			sint_8;

#define snprintf _snprintf
#define M_PI            3.14159265358979323846  /* pi */
#define DLLENTRY __declspec(dllexport)

  // Temporarily hardcode this location
#define AO_PLUGIN_PATH "c:\\Program Files\\Common Files\\Xiphophorus\\ao"

#define SHARED_LIB_EXT ".dll"

#endif /* __OS_TYPES_H__ */

1.1                  ao/win32/include/readdir.h.bak

Index: readdir.h.bak
===================================================================
/* 
 * Structures and types used to implement opendir/readdir/closedir 
 * on Windows 95/NT. 
 */ 

#include <io.h> 
#include <stdio.h> 
#include <stdlib.h> 
#include <sys/types.h> 

/* struct dirent - same as Unix */ 
struct dirent 
{
    long d_ino; /* inode (always 1 in WIN32) */ 
    off_t d_off; /* offset to this dirent */ 
    unsigned short d_reclen; /* length of d_name */ 
    char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ 
}; 

/* typedef DIR - not the same as Unix */ 
typedef struct 
{
    long handle; /* _findfirst/_findnext handle */ 
    short offset; /* offset into directory */ 
    short finished; /* 1 if there are not more files */ 
    struct _finddata_t fileinfo; /* from _findfirst/_findnext */ 
    char *dir; /* the dir we are reading */ 
    struct dirent dent; /* the dirent to return */ 
} DIR; 

/* Function prototypes */ 
DIR *opendir(char *); 
struct dirent *readdir(DIR *); 
int closedir(DIR *);

#define __S_ISTYPE(mode, mask)  (((mode) & _S_IFMT) == (mask))
#define S_ISREG(mode)    __S_ISTYPE((mode), _S_IFREG)

/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2000 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Apache" and "Apache Software Foundation" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact apache at apache.org.
 *
 * 5. Products derived from this software may not be called "Apache",
 *    nor may "Apache" appear in their name, without prior written
 *    permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 *
 * Portions of this software are based upon public domain software
 * originally written at the National Center for Supercomputing Applications,
 * University of Illinois, Urbana-Champaign.
 */

1.1                  ao/win32/include/uiutil.h

Index: uiutil.h
===================================================================
#ifndef __UIUTIL_H__
# define __UIUTIL_H__
/*
 * $Id: uiutil.h,v 1.1 2001/09/05 19:10:00 cwolf Exp $
 * $Name:  $
 * 
 *  Utility funtions for windows ui.
 */

 HWND getConsoleWindow(void)
#endif

1.1                  ao/win32/src/dlfcn.c

Index: dlfcn.c
===================================================================
/*
 * $Id: dlfcn.c,v 1.1 2001/09/05 19:10:01 cwolf Exp $
 * $Name:  $
 * 
 * Adopted from Apache DSO code.
 * Portions copyright Apache Software Foundation
 *
 * Structures and types used to implement dlopen, dlsym, etc.
 * on Windows 95/NT.
 */
#include <windows.h>
#include <string.h>
#include <stdio.h>

#include "dlfcn.h"
#include "os_types.h"

void *dlopen(const char *module_name, int mode)
{
    UINT em;
    HINSTANCE dsoh;
    char path[MAX_PATH], *p;
    /* Load the module...
     * per PR2555, the LoadLibraryEx function is very picky about slashes.
     * Debugging on NT 4 SP 6a reveals First Chance Exception within NTDLL.
     * LoadLibrary in the MS PSDK also reveals that it -explicitly- states
     * that backslashes must be used.
     *
     * Transpose '\' for '/' in the filename.
     */
    (void)strncpy(path, module_name, MAX_PATH);
    p = path;
    while (p = strchr(p, '/'))
        *p = '\\';
    
    /* First assume the dso/dll's required by -this- dso are sitting in the 
     * same path or can be found in the usual places.  Failing that, let's
     * let that dso look in the apache root.
     */
    em = SetErrorMode(SEM_FAILCRITICALERRORS);
    dsoh = LoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
    if (!dsoh) {
        dsoh = LoadLibraryEx(path, NULL, 0);
    }
    SetErrorMode(em);
    return (void *)dsoh;
}

char *dlerror(void)
{
    int len, nErrorCode;
    static char errstr[120];
    /* This is -not- threadsafe code, but it's about the best we can do.
     * mostly a potential problem for isapi modules, since LoadModule
     * errors are handled within a single config thread.
     */
    
    if((nErrorCode = GetLastError()) == 0)
      return((char *)0);

    SetLastError(0); // clear the last error
    len = snprintf(errstr, sizeof(errstr), "(%d) ", nErrorCode);

    len += FormatMessage( 
            FORMAT_MESSAGE_FROM_SYSTEM,
            NULL,
            nErrorCode,
            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
            (LPTSTR) errstr + len,
            sizeof(errstr) - len,
            NULL 
        );
        /* FormatMessage may have appended a newline (\r\n). So remove it 
         * and use ": " instead like the Unix errors. The error may also
         * end with a . before the return - if so, trash it.
         */
    if (len > 1 && errstr[len-2] == '\r' && errstr[len-1] == '\n') {
        if (len > 2 && errstr[len-3] == '.')
            len--;
        errstr[len-2] = ':';
        errstr[len-1] = ' ';
    }
    return errstr;
}

int dlclose(void *handle)
{
  return  FreeLibrary(handle);
}

void *dlsym(void *handle, const char *name)
{
  return GetProcAddress(handle, name);
}

1.1                  ao/win32/src/readdir.c

Index: readdir.c
===================================================================
/*
 * $Id: readdir.c,v 1.1 2001/09/05 19:10:01 cwolf Exp $
 * $Name:  $
 *
 * Portions copyright Apache Software Foundation (see below)
 * 
 * Functions defined are opendir(), readdir() and closedir() with the 
 * same prototypes as the normal dirent.h implementation. 
 * 
 * Does not implement telldir(), seekdir(), rewinddir() or scandir(). 
 * The dirent struct is compatible with Unix, except that d_ino is 
 * always 1 and d_off is made up as we go along. 
 * 
 * The DIR typedef is not compatible with Unix. 
 **********************************************************************/ 
#include <malloc.h> 
#include <string.h> 
#include <errno.h> 

#include "dirent.h" 

DIR *opendir(char *dir) 
{ 
    DIR *dp; 
    char *filespec; 
    long handle; 
    int index; 

    filespec = malloc(strlen(dir) + 2 + 1); 
    strcpy(filespec, dir); 
    index = strlen(filespec) - 1; 
    if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\')) 
        filespec[index] = '\0'; 
    strcat(filespec, "/*"); 

    dp = (DIR *)malloc(sizeof(DIR)); 
    dp->offset = 0; 
    dp->finished = 0; 
    dp->dir = strdup(dir); 

    if ((handle = _findfirst(filespec, &(dp->fileinfo))) < 0) { 
        if (errno == ENOENT) 
            dp->finished = 1; 
        else 
        return NULL; 
    } 

    dp->handle = handle; 
    free(filespec); 

    return dp; 
} 

struct dirent *readdir(DIR *dp) 
{ 
    if (!dp || dp->finished) return NULL; 

    if (dp->offset != 0) { 
        if (_findnext(dp->handle, &(dp->fileinfo)) < 0) { 
            dp->finished = 1; 
            return NULL; 
        } 
    } 
    dp->offset++; 

    strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME); 
    dp->dent.d_ino = 1; 
    dp->dent.d_reclen = strlen(dp->dent.d_name); 
    dp->dent.d_off = dp->offset; 

    return &(dp->dent); 
} 

int closedir(DIR *dp) 
{ 
    if (!dp) return 0; 
    _findclose(dp->handle); 
    if (dp->dir) free(dp->dir); 
    if (dp) free(dp); 

    return 0; 
} 
/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2000 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Apache" and "Apache Software Foundation" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact apache at apache.org.
 *
 * 5. Products derived from this software may not be called "Apache",
 *    nor may "Apache" appear in their name, without prior written
 *    permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 *
 * Portions of this software are based upon public domain software
 * originally written at the National Center for Supercomputing Applications,
 * University of Illinois, Urbana-Champaign.
 */

1.1                  ao/win32/src/uiutil.c

Index: uiutil.c
===================================================================
/*
 * $Id: uiutil.c,v 1.1 2001/09/05 19:10:01 cwolf Exp $
 * $Name:  $
 *
 * Get the window handle of the controlling console of a console-mode
 * application.
 *
 * This came right off Microsoft's MSDN library, so I doubt there's
 * less kludgy way to handle this.
 */
#define MY_BUFSIZE 1024 // Buffer size for console window titles.

HWND getConsoleWindow()
{
        HWND hwndFound;         // This is what is returned to the caller.
  char pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated
                                      // WindowTitle.
  char pszOldWindowTitle[MY_BUFSIZE]; // Contains original
                                      // WindowTitle.

       // Fetch current window title.
  GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE);

       // Format a "unique" NewWindowTitle.
  (void)wsprintf(pszNewWindowTitle,"%d/%d", GetTickCount(), 
                                            GetCurrentProcessId());

       // Change current window title.
  SetConsoleTitle(pszNewWindowTitle);

       // Ensure window title has been updated.
  Sleep(40);

       // Look for NewWindowTitle.
  hwndFound=FindWindow(NULL, pszNewWindowTitle);

       // Restore original window title.
  SetConsoleTitle(pszOldWindowTitle);

  return(hwndFound);
} 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list