SF.net SVN: mahogany: [7133] trunk/M/lib/compface

[email protected]
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
Revision: 7133
          http://svn.sourceforge.net/mahogany/?rev=7133&view=rev
Author:   vadz
Date:     2006-10-02 11:26:58 -0700 (Mon, 02 Oct 2006)

Log Message:
-----------
applied our build patches from the old cvs repository

Modified Paths:
--------------
    trunk/M/lib/compface/arith.c
    trunk/M/lib/compface/compface.c
    trunk/M/lib/compface/compface.h
    trunk/M/lib/compface/compface_private.h
    trunk/M/lib/compface/file.c

Added Paths:
-----------
    trunk/M/lib/compface/Makefile.M
    trunk/M/lib/compface/compface.vcproj

Added: trunk/M/lib/compface/Makefile.M
===================================================================
--- trunk/M/lib/compface/Makefile.M	                        (rev 0)
+++ trunk/M/lib/compface/Makefile.M	2006-10-02 18:26:58 UTC (rev 7133)
@@ -0,0 +1,42 @@
+###############################################################################
+# Project:     M
+# File name:   lib/compface/Makefile.M
+# Purpose:     makefile for compface library
+# Author:      Vadim Zeitlin
+# Modified by:
+# Created:     2004-05-02
+# CVS-ID:      $Id: Makefile.M,v 1.2 2004/07/09 10:22:58 vadz Exp $
+# Copyright:   (c) 2004 Vadim Zeitlin <[email protected]>
+# Licence:     M license
+###############################################################################
+
+include ../../makeopts
+
+CPPFLAGS=$(CFACE_CPPFLAGS)
+CFLAGS=$(CFACE_CFLAGS)
+
+OBJECTS=arith.o file.o compress.o gen.o uncompface.o compface.o
+
+LIBRARY=libcompface.a
+
+all:		$(LIBRARY)
+	@true
+
+include ../../makerules $(wildcard *.d)
+
+$(LIBRARY):	$(OBJECTS)
+	ar rc $(LIBRARY) $(OBJECTS)
+	-ranlib $(LIBRARY)
+
+arith.o:	arith.c compface.h data.h
+cmain.o:	cmain.c compface.h data.h
+compface.o:	compface.c compface.h data.h
+compress.o:	compress.c compface.h data.h
+file.o:		file.c compface.h data.h
+gen.o:		gen.c compface.h data.h
+uncompface.o:	uncompface.c compface.h data.h
+
+clean:
+	rm -f $(OBJECTS) $(LIBRARY) $(OBJECTS:.o=.d)
+
+.PHONY: all clean

Modified: trunk/M/lib/compface/arith.c
===================================================================
--- trunk/M/lib/compface/arith.c	2006-10-02 17:28:00 UTC (rev 7132)
+++ trunk/M/lib/compface/arith.c	2006-10-02 18:26:58 UTC (rev 7133)
@@ -17,6 +17,7 @@
 #include "config.h"
 #endif
 
+#include <stdio.h>
 #include "compface.h"
 
 void

Modified: trunk/M/lib/compface/compface.c
===================================================================
--- trunk/M/lib/compface/compface.c	2006-10-02 17:28:00 UTC (rev 7132)
+++ trunk/M/lib/compface/compface.c	2006-10-02 18:26:58 UTC (rev 7133)
@@ -13,8 +13,6 @@
  *  to me, then an attempt will be made to fix them.
  */
 
-#define MAIN
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif

Modified: trunk/M/lib/compface/compface.h
===================================================================
--- trunk/M/lib/compface/compface.h	2006-10-02 17:28:00 UTC (rev 7132)
+++ trunk/M/lib/compface/compface.h	2006-10-02 18:26:58 UTC (rev 7133)
@@ -20,7 +20,7 @@
 
 /* For all function declarations, if ANSI then use a prototype. */
 
-#if  defined(__STDC__)
+#if  defined(__STDC__) || defined(__cplusplus)
 #define P(args)  args
 #else  /* ! __STDC__ */
 #define P(args)  ()

Added: trunk/M/lib/compface/compface.vcproj
===================================================================
--- trunk/M/lib/compface/compface.vcproj	                        (rev 0)
+++ trunk/M/lib/compface/compface.vcproj	2006-10-02 18:26:58 UTC (rev 7133)
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="compface"
+	ProjectGUID="{0E9F4403-1AA1-4824-A99F-041B1BF18D14}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;SYSV32"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Release/compface.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="1"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Release\compface.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SYSV32"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/compface.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="1"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Debug\compface.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug Purify|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SYSV32"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderFile=".\Debug/compface.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="1"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile=".\Debug\compface.lib"
+				SuppressStartupBanner="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="arith.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug Purify|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="compface.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug Purify|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="compress.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug Purify|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="file.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug Purify|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="gen.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug Purify|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="uncompface.c">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug Purify|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Modified: trunk/M/lib/compface/compface_private.h
===================================================================
--- trunk/M/lib/compface/compface_private.h	2006-10-02 17:28:00 UTC (rev 7132)
+++ trunk/M/lib/compface/compface_private.h	2006-10-02 18:26:58 UTC (rev 7133)
@@ -15,8 +15,13 @@
 
 #include "compface.h"
 
+#ifdef MAIN
 #define EXTERN
 #define INIT(x) = x
+#else /* !MAIN */
+#define EXTERN extern
+#define INIT(x)
+#endif /* MAIN/!MAIN */
 
 /* need to know how many bits per hexadecimal digit for io */
 EXTERN char HexDigits[] INIT("0123456789ABCDEF");
@@ -28,8 +33,10 @@
 
 /* data.h was established by sampling over 1000 faces and icons */
 EXTERN Guesses G
+#ifdef MAIN
 =
 #include "data.h"
+#endif
 ;
 
 /* A stack of probability values */
@@ -37,6 +44,7 @@
 EXTERN int NumProbs INIT(0);
 
 EXTERN Prob levels[4][3]
+#ifdef MAIN
 =
 {
 	{{1, 255},	{251, 0},	{4, 251}},	/* Top of tree almost always grey */
@@ -44,9 +52,11 @@
 	{{33, 223},	{159, 0},	{64, 159}},
 	{{131, 0},	{0, 0}, 	{125, 131}}	/* Grey disallowed at bottom */
 }
+#endif
 ;
 
 EXTERN Prob freqs[16]
+#ifdef MAIN
 =
 {
 	{0, 0}, 	{38, 0},	{38, 38},	{13, 152},
@@ -54,6 +64,7 @@
 	{38, 114},	{13, 191},	{13, 204},	{6, 236},
 	{13, 217},	{6, 242},	{5, 248},	{3, 253}
 }
+#endif
 ;
 
 EXTERN int status;

Modified: trunk/M/lib/compface/file.c
===================================================================
--- trunk/M/lib/compface/file.c	2006-10-02 17:28:00 UTC (rev 7132)
+++ trunk/M/lib/compface/file.c	2006-10-02 18:26:58 UTC (rev 7133)
@@ -20,6 +20,9 @@
 
 #include "compface.h"
 
+#include <string.h>
+#include <stdio.h>
+
 int compface_xbitmap=0;
 
 void


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.