You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/05/02 01:50:38 UTC
[lucy-commits] svn commit: r1098445 [1/23] - in /incubator/lucy/trunk: charmonizer/
charmonizer/src/Charmonizer/ charmonizer/src/Charmonizer/Core/
charmonizer/src/Charmonizer/Probe/ charmonizer/src/Charmonizer/Test/
clownfish/lib/ clownfish/lib/Clownfish/Binding/ clo...
Author: marvin
Date: Sun May 1 23:50:24 2011
New Revision: 1098445
URL: http://svn.apache.org/viewvc?rev=1098445&view=rev
Log:
LUCY-141 whitespace.patch
Apply all the changes which AStyle (under lucytidy.pl) will impose on our C
code and also perform some manual cleanups.
For a staged version of this commit broken into multiple patch files, see the
JIRA issue.
Modified:
incubator/lucy/trunk/charmonizer/charmonize.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Integers.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/LargeFiles.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Memory.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Memory.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/UnusedVars.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/VariadicMacros.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/AllTests.h
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestDirManip.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestFuncMacro.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHeaders.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestIntegers.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestLargeFiles.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestUnusedVars.c
incubator/lucy/trunk/charmonizer/src/Charmonizer/Test/TestVariadicMacros.c
incubator/lucy/trunk/clownfish/lib/Clownfish.xs
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core.pm
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Class.pm
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Method.pm
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl.pm
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Constructor.pm
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/Method.pm
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Perl/TypeMap.pm
incubator/lucy/trunk/clownfish/src/CFCBase.c
incubator/lucy/trunk/clownfish/src/CFCCBlock.c
incubator/lucy/trunk/clownfish/src/CFCClass.c
incubator/lucy/trunk/clownfish/src/CFCClass.h
incubator/lucy/trunk/clownfish/src/CFCDocuComment.c
incubator/lucy/trunk/clownfish/src/CFCDumpable.c
incubator/lucy/trunk/clownfish/src/CFCFile.c
incubator/lucy/trunk/clownfish/src/CFCFile.h
incubator/lucy/trunk/clownfish/src/CFCFunction.c
incubator/lucy/trunk/clownfish/src/CFCFunction.h
incubator/lucy/trunk/clownfish/src/CFCHierarchy.c
incubator/lucy/trunk/clownfish/src/CFCHierarchy.h
incubator/lucy/trunk/clownfish/src/CFCMethod.c
incubator/lucy/trunk/clownfish/src/CFCMethod.h
incubator/lucy/trunk/clownfish/src/CFCParamList.c
incubator/lucy/trunk/clownfish/src/CFCParamList.h
incubator/lucy/trunk/clownfish/src/CFCParcel.c
incubator/lucy/trunk/clownfish/src/CFCSymbol.c
incubator/lucy/trunk/clownfish/src/CFCSymbol.h
incubator/lucy/trunk/clownfish/src/CFCType.c
incubator/lucy/trunk/clownfish/src/CFCType.h
incubator/lucy/trunk/clownfish/src/CFCUtil.c
incubator/lucy/trunk/clownfish/src/CFCUtil.h
incubator/lucy/trunk/clownfish/src/CFCVariable.c
incubator/lucy/trunk/clownfish/src/CFCVariable.h
incubator/lucy/trunk/clownfish/t/400-class.t
incubator/lucy/trunk/clownfish/t/cfsource/Animal/Dog.cfh
incubator/lucy/trunk/core/Lucy/Analysis/Analyzer.c
incubator/lucy/trunk/core/Lucy/Analysis/Analyzer.cfh
incubator/lucy/trunk/core/Lucy/Analysis/CaseFolder.c
incubator/lucy/trunk/core/Lucy/Analysis/CaseFolder.cfh
incubator/lucy/trunk/core/Lucy/Analysis/Inversion.c
incubator/lucy/trunk/core/Lucy/Analysis/Inversion.cfh
incubator/lucy/trunk/core/Lucy/Analysis/PolyAnalyzer.c
incubator/lucy/trunk/core/Lucy/Analysis/PolyAnalyzer.cfh
incubator/lucy/trunk/core/Lucy/Analysis/RegexTokenizer.c
incubator/lucy/trunk/core/Lucy/Analysis/RegexTokenizer.cfh
incubator/lucy/trunk/core/Lucy/Analysis/SnowballStemmer.c
incubator/lucy/trunk/core/Lucy/Analysis/SnowballStemmer.cfh
incubator/lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.c
incubator/lucy/trunk/core/Lucy/Analysis/SnowballStopFilter.cfh
incubator/lucy/trunk/core/Lucy/Analysis/Token.c
incubator/lucy/trunk/core/Lucy/Analysis/Token.cfh
incubator/lucy/trunk/core/Lucy/Document/Doc.c
incubator/lucy/trunk/core/Lucy/Document/Doc.cfh
incubator/lucy/trunk/core/Lucy/Document/HitDoc.c
incubator/lucy/trunk/core/Lucy/Document/HitDoc.cfh
incubator/lucy/trunk/core/Lucy/Highlight/HeatMap.c
incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.c
incubator/lucy/trunk/core/Lucy/Highlight/Highlighter.cfh
incubator/lucy/trunk/core/Lucy/Index/BackgroundMerger.c
incubator/lucy/trunk/core/Lucy/Index/BitVecDelDocs.c
incubator/lucy/trunk/core/Lucy/Index/DataReader.c
incubator/lucy/trunk/core/Lucy/Index/DataReader.cfh
incubator/lucy/trunk/core/Lucy/Index/DataWriter.c
incubator/lucy/trunk/core/Lucy/Index/DataWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/DeletionsReader.c
incubator/lucy/trunk/core/Lucy/Index/DeletionsReader.cfh
incubator/lucy/trunk/core/Lucy/Index/DeletionsWriter.c
incubator/lucy/trunk/core/Lucy/Index/DeletionsWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/DocReader.c
incubator/lucy/trunk/core/Lucy/Index/DocReader.cfh
incubator/lucy/trunk/core/Lucy/Index/DocVector.c
incubator/lucy/trunk/core/Lucy/Index/DocWriter.c
incubator/lucy/trunk/core/Lucy/Index/DocWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/FilePurger.c
incubator/lucy/trunk/core/Lucy/Index/FilePurger.cfh
incubator/lucy/trunk/core/Lucy/Index/HighlightReader.c
incubator/lucy/trunk/core/Lucy/Index/HighlightReader.cfh
incubator/lucy/trunk/core/Lucy/Index/HighlightWriter.c
incubator/lucy/trunk/core/Lucy/Index/HighlightWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/IndexManager.c
incubator/lucy/trunk/core/Lucy/Index/IndexManager.cfh
incubator/lucy/trunk/core/Lucy/Index/IndexReader.c
incubator/lucy/trunk/core/Lucy/Index/IndexReader.cfh
incubator/lucy/trunk/core/Lucy/Index/Indexer.c
incubator/lucy/trunk/core/Lucy/Index/Indexer.cfh
incubator/lucy/trunk/core/Lucy/Index/Inverter.c
incubator/lucy/trunk/core/Lucy/Index/Inverter.cfh
incubator/lucy/trunk/core/Lucy/Index/LexIndex.c
incubator/lucy/trunk/core/Lucy/Index/LexIndex.cfh
incubator/lucy/trunk/core/Lucy/Index/Lexicon.c
incubator/lucy/trunk/core/Lucy/Index/LexiconReader.c
incubator/lucy/trunk/core/Lucy/Index/LexiconReader.cfh
incubator/lucy/trunk/core/Lucy/Index/LexiconWriter.c
incubator/lucy/trunk/core/Lucy/Index/LexiconWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/PolyLexicon.c
incubator/lucy/trunk/core/Lucy/Index/PolyLexicon.cfh
incubator/lucy/trunk/core/Lucy/Index/PolyReader.c
incubator/lucy/trunk/core/Lucy/Index/PolyReader.cfh
incubator/lucy/trunk/core/Lucy/Index/Posting.c
incubator/lucy/trunk/core/Lucy/Index/Posting.cfh
incubator/lucy/trunk/core/Lucy/Index/Posting/MatchPosting.c
incubator/lucy/trunk/core/Lucy/Index/Posting/MatchPosting.cfh
incubator/lucy/trunk/core/Lucy/Index/Posting/RawPosting.c
incubator/lucy/trunk/core/Lucy/Index/Posting/RawPosting.cfh
incubator/lucy/trunk/core/Lucy/Index/Posting/RichPosting.c
incubator/lucy/trunk/core/Lucy/Index/Posting/RichPosting.cfh
incubator/lucy/trunk/core/Lucy/Index/Posting/ScorePosting.c
incubator/lucy/trunk/core/Lucy/Index/Posting/ScorePosting.cfh
incubator/lucy/trunk/core/Lucy/Index/PostingList.c
incubator/lucy/trunk/core/Lucy/Index/PostingListReader.c
incubator/lucy/trunk/core/Lucy/Index/PostingListReader.cfh
incubator/lucy/trunk/core/Lucy/Index/PostingListWriter.c
incubator/lucy/trunk/core/Lucy/Index/PostingListWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/PostingPool.c
incubator/lucy/trunk/core/Lucy/Index/PostingPool.cfh
incubator/lucy/trunk/core/Lucy/Index/RawLexicon.c
incubator/lucy/trunk/core/Lucy/Index/RawLexicon.cfh
incubator/lucy/trunk/core/Lucy/Index/RawPostingList.c
incubator/lucy/trunk/core/Lucy/Index/RawPostingList.cfh
incubator/lucy/trunk/core/Lucy/Index/SegLexicon.c
incubator/lucy/trunk/core/Lucy/Index/SegLexicon.cfh
incubator/lucy/trunk/core/Lucy/Index/SegPostingList.c
incubator/lucy/trunk/core/Lucy/Index/SegPostingList.cfh
incubator/lucy/trunk/core/Lucy/Index/SegReader.c
incubator/lucy/trunk/core/Lucy/Index/SegReader.cfh
incubator/lucy/trunk/core/Lucy/Index/SegWriter.c
incubator/lucy/trunk/core/Lucy/Index/SegWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/Segment.c
incubator/lucy/trunk/core/Lucy/Index/Segment.cfh
incubator/lucy/trunk/core/Lucy/Index/Similarity.c
incubator/lucy/trunk/core/Lucy/Index/Similarity.cfh
incubator/lucy/trunk/core/Lucy/Index/SkipStepper.c
incubator/lucy/trunk/core/Lucy/Index/SkipStepper.cfh
incubator/lucy/trunk/core/Lucy/Index/Snapshot.c
incubator/lucy/trunk/core/Lucy/Index/Snapshot.cfh
incubator/lucy/trunk/core/Lucy/Index/SortCache.c
incubator/lucy/trunk/core/Lucy/Index/SortCache/NumericSortCache.c
incubator/lucy/trunk/core/Lucy/Index/SortCache/NumericSortCache.cfh
incubator/lucy/trunk/core/Lucy/Index/SortCache/TextSortCache.c
incubator/lucy/trunk/core/Lucy/Index/SortCache/TextSortCache.cfh
incubator/lucy/trunk/core/Lucy/Index/SortFieldWriter.c
incubator/lucy/trunk/core/Lucy/Index/SortFieldWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/SortReader.c
incubator/lucy/trunk/core/Lucy/Index/SortReader.cfh
incubator/lucy/trunk/core/Lucy/Index/SortWriter.c
incubator/lucy/trunk/core/Lucy/Index/SortWriter.cfh
incubator/lucy/trunk/core/Lucy/Index/TermInfo.c
incubator/lucy/trunk/core/Lucy/Index/TermInfo.cfh
incubator/lucy/trunk/core/Lucy/Index/TermStepper.c
incubator/lucy/trunk/core/Lucy/Index/TermVector.c
incubator/lucy/trunk/core/Lucy/Index/TermVector.cfh
incubator/lucy/trunk/core/Lucy/Index/ZombieKeyedHash.c
incubator/lucy/trunk/core/Lucy/Object/BitVector.c
incubator/lucy/trunk/core/Lucy/Object/BitVector.cfh
incubator/lucy/trunk/core/Lucy/Object/ByteBuf.c
incubator/lucy/trunk/core/Lucy/Object/ByteBuf.cfh
incubator/lucy/trunk/core/Lucy/Object/CharBuf.c
incubator/lucy/trunk/core/Lucy/Object/CharBuf.cfh
incubator/lucy/trunk/core/Lucy/Object/Err.c
incubator/lucy/trunk/core/Lucy/Object/Err.cfh
incubator/lucy/trunk/core/Lucy/Object/Hash.c
incubator/lucy/trunk/core/Lucy/Object/Hash.cfh
incubator/lucy/trunk/core/Lucy/Object/Host.cfh
incubator/lucy/trunk/core/Lucy/Object/I32Array.c
incubator/lucy/trunk/core/Lucy/Object/I32Array.cfh
incubator/lucy/trunk/core/Lucy/Object/LockFreeRegistry.c
incubator/lucy/trunk/core/Lucy/Object/LockFreeRegistry.cfh
incubator/lucy/trunk/core/Lucy/Object/Num.c
incubator/lucy/trunk/core/Lucy/Object/Num.cfh
incubator/lucy/trunk/core/Lucy/Object/Obj.c
incubator/lucy/trunk/core/Lucy/Object/Obj.cfh
incubator/lucy/trunk/core/Lucy/Object/VArray.c
incubator/lucy/trunk/core/Lucy/Object/VArray.cfh
incubator/lucy/trunk/core/Lucy/Object/VTable.c
incubator/lucy/trunk/core/Lucy/Object/VTable.cfh
incubator/lucy/trunk/core/Lucy/Plan/Architecture.c
incubator/lucy/trunk/core/Lucy/Plan/Architecture.cfh
incubator/lucy/trunk/core/Lucy/Plan/BlobType.c
incubator/lucy/trunk/core/Lucy/Plan/BlobType.cfh
incubator/lucy/trunk/core/Lucy/Plan/FieldType.c
incubator/lucy/trunk/core/Lucy/Plan/FieldType.cfh
incubator/lucy/trunk/core/Lucy/Plan/FullTextType.c
incubator/lucy/trunk/core/Lucy/Plan/FullTextType.cfh
incubator/lucy/trunk/core/Lucy/Plan/NumericType.c
incubator/lucy/trunk/core/Lucy/Plan/NumericType.cfh
incubator/lucy/trunk/core/Lucy/Plan/Schema.c
incubator/lucy/trunk/core/Lucy/Plan/Schema.cfh
incubator/lucy/trunk/core/Lucy/Plan/StringType.c
incubator/lucy/trunk/core/Lucy/Plan/StringType.cfh
incubator/lucy/trunk/core/Lucy/Plan/TextType.c
incubator/lucy/trunk/core/Lucy/Plan/TextType.cfh
incubator/lucy/trunk/core/Lucy/Search/ANDMatcher.c
incubator/lucy/trunk/core/Lucy/Search/ANDMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/ANDQuery.c
incubator/lucy/trunk/core/Lucy/Search/ANDQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/BitVecMatcher.c
incubator/lucy/trunk/core/Lucy/Search/Collector.c
incubator/lucy/trunk/core/Lucy/Search/Collector/SortCollector.c
incubator/lucy/trunk/core/Lucy/Search/Collector/SortCollector.cfh
incubator/lucy/trunk/core/Lucy/Search/Compiler.c
incubator/lucy/trunk/core/Lucy/Search/Compiler.cfh
incubator/lucy/trunk/core/Lucy/Search/HitQueue.c
incubator/lucy/trunk/core/Lucy/Search/HitQueue.cfh
incubator/lucy/trunk/core/Lucy/Search/Hits.c
incubator/lucy/trunk/core/Lucy/Search/IndexSearcher.c
incubator/lucy/trunk/core/Lucy/Search/IndexSearcher.cfh
incubator/lucy/trunk/core/Lucy/Search/LeafQuery.c
incubator/lucy/trunk/core/Lucy/Search/LeafQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/MatchAllMatcher.c
incubator/lucy/trunk/core/Lucy/Search/MatchAllMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/MatchAllQuery.c
incubator/lucy/trunk/core/Lucy/Search/MatchAllQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/MatchDoc.c
incubator/lucy/trunk/core/Lucy/Search/MatchDoc.cfh
incubator/lucy/trunk/core/Lucy/Search/Matcher.c
incubator/lucy/trunk/core/Lucy/Search/Matcher.cfh
incubator/lucy/trunk/core/Lucy/Search/NOTMatcher.c
incubator/lucy/trunk/core/Lucy/Search/NOTMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/NOTQuery.c
incubator/lucy/trunk/core/Lucy/Search/NOTQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/NoMatchMatcher.c
incubator/lucy/trunk/core/Lucy/Search/NoMatchQuery.c
incubator/lucy/trunk/core/Lucy/Search/NoMatchQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/ORMatcher.c
incubator/lucy/trunk/core/Lucy/Search/ORMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/ORQuery.c
incubator/lucy/trunk/core/Lucy/Search/ORQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/PhraseMatcher.c
incubator/lucy/trunk/core/Lucy/Search/PhraseMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/PhraseQuery.c
incubator/lucy/trunk/core/Lucy/Search/PhraseQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/PolyMatcher.c
incubator/lucy/trunk/core/Lucy/Search/PolyMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/PolyQuery.c
incubator/lucy/trunk/core/Lucy/Search/PolyQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/PolySearcher.c
incubator/lucy/trunk/core/Lucy/Search/PolySearcher.cfh
incubator/lucy/trunk/core/Lucy/Search/Query.c
incubator/lucy/trunk/core/Lucy/Search/QueryParser.c
incubator/lucy/trunk/core/Lucy/Search/QueryParser.cfh
incubator/lucy/trunk/core/Lucy/Search/RangeMatcher.c
incubator/lucy/trunk/core/Lucy/Search/RangeMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/RangeQuery.c
incubator/lucy/trunk/core/Lucy/Search/RangeQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/RequiredOptionalMatcher.c
incubator/lucy/trunk/core/Lucy/Search/RequiredOptionalMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/RequiredOptionalQuery.c
incubator/lucy/trunk/core/Lucy/Search/RequiredOptionalQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/Searcher.c
incubator/lucy/trunk/core/Lucy/Search/Searcher.cfh
incubator/lucy/trunk/core/Lucy/Search/SeriesMatcher.c
incubator/lucy/trunk/core/Lucy/Search/SortRule.c
incubator/lucy/trunk/core/Lucy/Search/SortRule.cfh
incubator/lucy/trunk/core/Lucy/Search/SortSpec.c
incubator/lucy/trunk/core/Lucy/Search/Span.c
incubator/lucy/trunk/core/Lucy/Search/Span.cfh
incubator/lucy/trunk/core/Lucy/Search/TermMatcher.c
incubator/lucy/trunk/core/Lucy/Search/TermMatcher.cfh
incubator/lucy/trunk/core/Lucy/Search/TermQuery.c
incubator/lucy/trunk/core/Lucy/Search/TermQuery.cfh
incubator/lucy/trunk/core/Lucy/Search/TopDocs.c
incubator/lucy/trunk/core/Lucy/Store/CompoundFileReader.c
incubator/lucy/trunk/core/Lucy/Store/CompoundFileReader.cfh
incubator/lucy/trunk/core/Lucy/Store/CompoundFileWriter.c
incubator/lucy/trunk/core/Lucy/Store/DirHandle.c
incubator/lucy/trunk/core/Lucy/Store/DirHandle.cfh
incubator/lucy/trunk/core/Lucy/Store/FSDirHandle.c
incubator/lucy/trunk/core/Lucy/Store/FSDirHandle.cfh
incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.c
incubator/lucy/trunk/core/Lucy/Store/FSFileHandle.cfh
incubator/lucy/trunk/core/Lucy/Store/FSFolder.c
incubator/lucy/trunk/core/Lucy/Store/FSFolder.cfh
incubator/lucy/trunk/core/Lucy/Store/FileHandle.c
incubator/lucy/trunk/core/Lucy/Store/FileHandle.cfh
incubator/lucy/trunk/core/Lucy/Store/FileWindow.c
incubator/lucy/trunk/core/Lucy/Store/Folder.c
incubator/lucy/trunk/core/Lucy/Store/Folder.cfh
incubator/lucy/trunk/core/Lucy/Store/InStream.c
incubator/lucy/trunk/core/Lucy/Store/InStream.cfh
incubator/lucy/trunk/core/Lucy/Store/Lock.c
incubator/lucy/trunk/core/Lucy/Store/Lock.cfh
incubator/lucy/trunk/core/Lucy/Store/LockFactory.c
incubator/lucy/trunk/core/Lucy/Store/LockFactory.cfh
incubator/lucy/trunk/core/Lucy/Store/OutStream.c
incubator/lucy/trunk/core/Lucy/Store/OutStream.cfh
incubator/lucy/trunk/core/Lucy/Store/RAMDirHandle.c
incubator/lucy/trunk/core/Lucy/Store/RAMFile.c
incubator/lucy/trunk/core/Lucy/Store/RAMFileHandle.c
incubator/lucy/trunk/core/Lucy/Store/RAMFileHandle.cfh
incubator/lucy/trunk/core/Lucy/Store/RAMFolder.c
incubator/lucy/trunk/core/Lucy/Store/RAMFolder.cfh
incubator/lucy/trunk/core/Lucy/Store/SharedLock.c
incubator/lucy/trunk/core/Lucy/Store/SharedLock.cfh
incubator/lucy/trunk/core/Lucy/Test.c
incubator/lucy/trunk/core/Lucy/Test.cfh
incubator/lucy/trunk/core/Lucy/Test/Analysis/TestAnalyzer.c
incubator/lucy/trunk/core/Lucy/Test/Analysis/TestCaseFolder.c
incubator/lucy/trunk/core/Lucy/Test/Analysis/TestPolyAnalyzer.c
incubator/lucy/trunk/core/Lucy/Test/Analysis/TestRegexTokenizer.c
incubator/lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStemmer.c
incubator/lucy/trunk/core/Lucy/Test/Analysis/TestSnowballStopFilter.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestDocWriter.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestHighlightWriter.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestHighlightWriter.cfh
incubator/lucy/trunk/core/Lucy/Test/Index/TestIndexManager.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestPolyReader.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestPostingListWriter.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestPostingListWriter.cfh
incubator/lucy/trunk/core/Lucy/Test/Index/TestSegWriter.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestSegment.c
incubator/lucy/trunk/core/Lucy/Test/Index/TestSnapshot.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestBitVector.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestByteBuf.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestHash.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestI32Array.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestLockFreeRegistry.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestNum.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestObj.c
incubator/lucy/trunk/core/Lucy/Test/Object/TestVArray.c
incubator/lucy/trunk/core/Lucy/Test/Plan/TestArchitecture.c
incubator/lucy/trunk/core/Lucy/Test/Plan/TestArchitecture.cfh
incubator/lucy/trunk/core/Lucy/Test/Plan/TestBlobType.c
incubator/lucy/trunk/core/Lucy/Test/Plan/TestFieldType.c
incubator/lucy/trunk/core/Lucy/Test/Plan/TestFullTextType.c
incubator/lucy/trunk/core/Lucy/Test/Plan/TestNumericType.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestLeafQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestMatchAllQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestNOTQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestNoMatchQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestPhraseQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestPolyQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestQueryParser.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestQueryParser.cfh
incubator/lucy/trunk/core/Lucy/Test/Search/TestQueryParserLogic.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestQueryParserSyntax.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestRangeQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestReqOptQuery.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestSeriesMatcher.c
incubator/lucy/trunk/core/Lucy/Test/Search/TestTermQuery.c
incubator/lucy/trunk/core/Lucy/Test/Store/MockFileHandle.c
incubator/lucy/trunk/core/Lucy/Test/Store/MockFileHandle.cfh
incubator/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileReader.cfh
incubator/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestCompoundFileWriter.cfh
incubator/lucy/trunk/core/Lucy/Test/Store/TestFSDirHandle.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFileHandle.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestFSFolder.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestFileHandle.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestFolder.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestFolderCommon.cfh
incubator/lucy/trunk/core/Lucy/Test/Store/TestIOChunks.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestIOPrimitives.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestInStream.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestRAMDirHandle.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestRAMFileHandle.c
incubator/lucy/trunk/core/Lucy/Test/Store/TestRAMFolder.c
incubator/lucy/trunk/core/Lucy/Test/TestSchema.c
incubator/lucy/trunk/core/Lucy/Test/TestSchema.cfh
incubator/lucy/trunk/core/Lucy/Test/TestUtils.c
incubator/lucy/trunk/core/Lucy/Test/TestUtils.cfh
incubator/lucy/trunk/core/Lucy/Test/Util/BBSortEx.c
incubator/lucy/trunk/core/Lucy/Test/Util/BBSortEx.cfh
incubator/lucy/trunk/core/Lucy/Test/Util/TestAtomic.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestIndexFileNames.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestJson.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestMemory.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestMemoryPool.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestNumberUtils.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestPriorityQueue.c
incubator/lucy/trunk/core/Lucy/Test/Util/TestStringHelper.c
incubator/lucy/trunk/core/Lucy/Util/Atomic.c
incubator/lucy/trunk/core/Lucy/Util/Atomic.cfh
incubator/lucy/trunk/core/Lucy/Util/Debug.c
incubator/lucy/trunk/core/Lucy/Util/Debug.cfh
incubator/lucy/trunk/core/Lucy/Util/Freezer.c
incubator/lucy/trunk/core/Lucy/Util/Freezer.cfh
incubator/lucy/trunk/core/Lucy/Util/IndexFileNames.c
incubator/lucy/trunk/core/Lucy/Util/Json.cfh
incubator/lucy/trunk/core/Lucy/Util/Memory.c
incubator/lucy/trunk/core/Lucy/Util/Memory.cfh
incubator/lucy/trunk/core/Lucy/Util/MemoryPool.c
incubator/lucy/trunk/core/Lucy/Util/NumberUtils.cfh
incubator/lucy/trunk/core/Lucy/Util/PriorityQueue.c
incubator/lucy/trunk/core/Lucy/Util/ProcessID.c
incubator/lucy/trunk/core/Lucy/Util/ProcessID.cfh
incubator/lucy/trunk/core/Lucy/Util/Sleep.c
incubator/lucy/trunk/core/Lucy/Util/Sleep.cfh
incubator/lucy/trunk/core/Lucy/Util/SortExternal.c
incubator/lucy/trunk/core/Lucy/Util/SortExternal.cfh
incubator/lucy/trunk/core/Lucy/Util/SortUtils.c
incubator/lucy/trunk/core/Lucy/Util/SortUtils.cfh
incubator/lucy/trunk/core/Lucy/Util/Stepper.c
incubator/lucy/trunk/core/Lucy/Util/Stepper.cfh
incubator/lucy/trunk/core/Lucy/Util/StringHelper.c
incubator/lucy/trunk/core/Lucy/Util/StringHelper.cfh
incubator/lucy/trunk/core/Lucy/Util/StringHelper3.c
incubator/lucy/trunk/core/LucyX/Search/FilterMatcher.c
incubator/lucy/trunk/core/LucyX/Search/FilterMatcher.cfh
incubator/lucy/trunk/core/LucyX/Search/MockMatcher.c
incubator/lucy/trunk/core/LucyX/Search/MockMatcher.cfh
incubator/lucy/trunk/core/LucyX/Search/ProximityMatcher.c
incubator/lucy/trunk/core/LucyX/Search/ProximityMatcher.cfh
incubator/lucy/trunk/core/LucyX/Search/ProximityQuery.c
incubator/lucy/trunk/core/LucyX/Search/ProximityQuery.cfh
incubator/lucy/trunk/perl/lib/Lucy/Analysis/Inversion.pm
incubator/lucy/trunk/perl/lib/Lucy/Analysis/Token.pm
incubator/lucy/trunk/perl/lib/Lucy/Document/Doc.pm
incubator/lucy/trunk/perl/lib/Lucy/Document/HitDoc.pm
incubator/lucy/trunk/perl/lib/Lucy/Index/IndexReader.pm
incubator/lucy/trunk/perl/lib/Lucy/Index/Indexer.pm
incubator/lucy/trunk/perl/lib/Lucy/Index/Similarity.pm
incubator/lucy/trunk/perl/lib/Lucy/Index/SortCache.pm
incubator/lucy/trunk/perl/lib/Lucy/Object/CharBuf.pm
incubator/lucy/trunk/perl/lib/Lucy/Object/Hash.pm
incubator/lucy/trunk/perl/lib/Lucy/Object/Host.pm
incubator/lucy/trunk/perl/lib/Lucy/Object/I32Array.pm
incubator/lucy/trunk/perl/lib/Lucy/Object/Obj.pm
incubator/lucy/trunk/perl/lib/Lucy/Object/VArray.pm
incubator/lucy/trunk/perl/lib/Lucy/Store/OutStream.pm
incubator/lucy/trunk/perl/lib/Lucy/Util/IndexFileNames.pm
incubator/lucy/trunk/perl/xs/Lucy/Analysis/CaseFolder.c
incubator/lucy/trunk/perl/xs/Lucy/Analysis/RegexTokenizer.c
incubator/lucy/trunk/perl/xs/Lucy/Document/Doc.c
incubator/lucy/trunk/perl/xs/Lucy/Index/DocReader.c
incubator/lucy/trunk/perl/xs/Lucy/Index/Inverter.c
incubator/lucy/trunk/perl/xs/Lucy/Index/PolyReader.c
incubator/lucy/trunk/perl/xs/Lucy/Index/SegReader.c
incubator/lucy/trunk/perl/xs/Lucy/Object/Err.c
incubator/lucy/trunk/perl/xs/Lucy/Object/Host.c
incubator/lucy/trunk/perl/xs/Lucy/Object/LockFreeRegistry.c
incubator/lucy/trunk/perl/xs/Lucy/Object/Obj.c
incubator/lucy/trunk/perl/xs/Lucy/Object/VTable.c
incubator/lucy/trunk/perl/xs/Lucy/Store/FSFolder.c
incubator/lucy/trunk/perl/xs/Lucy/Util/Json.c
incubator/lucy/trunk/perl/xs/Lucy/Util/StringHelper.c
incubator/lucy/trunk/perl/xs/XSBind.c
incubator/lucy/trunk/perl/xs/XSBind.h
Modified: incubator/lucy/trunk/charmonizer/charmonize.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/charmonize.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/charmonize.c (original)
+++ incubator/lucy/trunk/charmonizer/charmonize.c Sun May 1 23:50:24 2011
@@ -34,12 +34,11 @@
#include "Charmonizer/Core/HeaderChecker.h"
#include "Charmonizer/Core/ConfWriter.h"
-int main(int argc, char **argv)
-{
+int main(int argc, char **argv) {
/* Parse and process arguments. */
if (argc < 3) {
- fprintf(stderr,
- "Usage: ./charmonize CC_COMMAND CC_FLAGS [VERBOSITY]\n");
+ fprintf(stderr,
+ "Usage: ./charmonize CC_COMMAND CC_FLAGS [VERBOSITY]\n");
exit(1);
}
else {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.c Sun May 1 23:50:24 2011
@@ -59,8 +59,7 @@ static void
S_do_test_compile();
void
-CC_init(const char *compiler_command, const char *compiler_flags)
-{
+CC_init(const char *compiler_command, const char *compiler_flags) {
if (Util_verbosity) { printf("Creating compiler object...\n"); }
/* Assign. */
@@ -86,8 +85,7 @@ CC_init(const char *compiler_command, co
}
void
-CC_clean_up()
-{
+CC_clean_up() {
char **dirs;
for (dirs = inc_dirs; *dirs != NULL; dirs++) {
@@ -100,8 +98,7 @@ CC_clean_up()
}
static char*
-S_inc_dir_string()
-{
+S_inc_dir_string() {
size_t needed = 0;
char *inc_dir_string;
char **dirs;
@@ -120,33 +117,32 @@ S_inc_dir_string()
}
chaz_bool_t
-CC_compile_exe(const char *source_path, const char *exe_name,
- const char *code, size_t code_len)
-{
+CC_compile_exe(const char *source_path, const char *exe_name,
+ const char *code, size_t code_len) {
const char *exe_ext = OS_exe_ext();
size_t exe_file_buf_size = strlen(exe_name) + strlen(exe_ext) + 1;
char *exe_file = (char*)malloc(exe_file_buf_size);
size_t exe_file_buf_len = sprintf(exe_file, "%s%s", exe_name, exe_ext);
char *inc_dir_string = S_inc_dir_string();
size_t command_max_size = strlen(cc_command)
- + strlen(source_path)
- + strlen(exe_flag)
- + exe_file_buf_len
- + strlen(inc_dir_string)
- + strlen(cc_flags)
- + 200; /* command start, _charm_run, etc. */
+ + strlen(source_path)
+ + strlen(exe_flag)
+ + exe_file_buf_len
+ + strlen(inc_dir_string)
+ + strlen(cc_flags)
+ + 200; /* command start, _charm_run, etc. */
char *command = (char*)malloc(command_max_size);
chaz_bool_t result;
(void)code_len; /* Unused. */
-
+
/* Write the source file. */
Util_write_file(source_path, code);
/* Prepare and run the compiler command. */
sprintf(command, "%s %s %s%s %s %s",
- cc_command, source_path,
- exe_flag, exe_file,
- inc_dir_string, cc_flags);
+ cc_command, source_path,
+ exe_flag, exe_file,
+ inc_dir_string, cc_flags);
if (Util_verbosity < 2) {
OS_run_quietly(command);
}
@@ -167,34 +163,33 @@ CC_compile_exe(const char *source_path,
}
chaz_bool_t
-CC_compile_obj(const char *source_path, const char *obj_name,
- const char *code, size_t code_len)
-{
+CC_compile_obj(const char *source_path, const char *obj_name,
+ const char *code, size_t code_len) {
const char *obj_ext = OS_obj_ext();
size_t obj_file_buf_size = strlen(obj_name) + strlen(obj_ext) + 1;
char *obj_file = (char*)malloc(obj_file_buf_size);
size_t obj_file_buf_len = sprintf(obj_file, "%s%s", obj_name, obj_ext);
char *inc_dir_string = S_inc_dir_string();
size_t command_max_size = strlen(cc_command)
- + strlen(source_path)
- + strlen(object_flag)
- + obj_file_buf_len
- + strlen(inc_dir_string)
- + strlen(cc_flags)
- + 200; /* command start, _charm_run, etc. */
+ + strlen(source_path)
+ + strlen(object_flag)
+ + obj_file_buf_len
+ + strlen(inc_dir_string)
+ + strlen(cc_flags)
+ + 200; /* command start, _charm_run, etc. */
char *command = (char*)malloc(command_max_size);
chaz_bool_t result;
(void)code_len; /* Unused. */
-
+
/* Write the source file. */
Util_write_file(source_path, code);
/* Prepare and run the compiler command. */
sprintf(command, "%s %s %s%s %s %s",
- cc_command, source_path,
- object_flag, obj_file,
- inc_dir_string,
- cc_flags);
+ cc_command, source_path,
+ object_flag, obj_file,
+ inc_dir_string,
+ cc_flags);
if (Util_verbosity < 2) {
OS_run_quietly(command);
}
@@ -215,16 +210,15 @@ CC_compile_obj(const char *source_path,
}
chaz_bool_t
-CC_test_compile(char *source, size_t source_len)
-{
+CC_test_compile(char *source, size_t source_len) {
chaz_bool_t compile_succeeded;
- if ( !Util_remove_and_verify(try_app_name) ) {
+ if (!Util_remove_and_verify(try_app_name)) {
Util_die("Failed to delete file '%s'", try_app_name);
}
compile_succeeded = CC_compile_exe(TRY_SOURCE_PATH, TRY_APP_BASENAME,
- source, source_len);
+ source, source_len);
S_clean_up_try();
@@ -232,22 +226,21 @@ CC_test_compile(char *source, size_t sou
}
char*
-CC_capture_output(char *source, size_t source_len, size_t *output_len)
-{
+CC_capture_output(char *source, size_t source_len, size_t *output_len) {
char *captured_output = NULL;
chaz_bool_t compile_succeeded;
/* Clear out previous versions and test to make sure removal worked. */
- if ( !Util_remove_and_verify(try_app_name) ) {
+ if (!Util_remove_and_verify(try_app_name)) {
Util_die("Failed to delete file '%s'", try_app_name);
}
- if ( !Util_remove_and_verify(TARGET_PATH) ) {
+ if (!Util_remove_and_verify(TARGET_PATH)) {
Util_die("Failed to delete file '%s'", TARGET_PATH);
}
/* Attempt compilation; if successful, run app and slurp output. */
- compile_succeeded = CC_compile_exe(TRY_SOURCE_PATH, TRY_APP_BASENAME,
- source, source_len);
+ compile_succeeded = CC_compile_exe(TRY_SOURCE_PATH, TRY_APP_BASENAME,
+ source, source_len);
if (compile_succeeded) {
OS_run_local(try_app_name, NULL);
captured_output = Util_slurp_file(TARGET_PATH, output_len);
@@ -263,43 +256,40 @@ CC_capture_output(char *source, size_t s
}
static void
-S_clean_up_try()
-{
+S_clean_up_try() {
remove(TRY_SOURCE_PATH);
OS_remove_exe(TRY_APP_BASENAME);
remove(TARGET_PATH);
}
static void
-S_do_test_compile()
-{
+S_do_test_compile() {
char *code = "int main() { return 0; }\n";
chaz_bool_t success;
-
+
if (Util_verbosity) {
printf("Trying to compile a small test file...\n");
}
/* Attempt compilation. */
- success = CC_compile_exe("_charm_try.c", "_charm_try",
- code, strlen(code));
+ success = CC_compile_exe("_charm_try.c", "_charm_try",
+ code, strlen(code));
if (!success) { Util_die("Failed to compile a small test file"); }
-
+
/* Clean up. */
remove("_charm_try.c");
OS_remove_exe("_charm_try");
}
void
-CC_add_inc_dir(const char *dir)
-{
- size_t num_dirs = 0;
+CC_add_inc_dir(const char *dir) {
+ size_t num_dirs = 0;
char **dirs = inc_dirs;
/* Count up the present number of dirs, reallocate. */
while (*dirs++ != NULL) { num_dirs++; }
num_dirs += 1; /* Passed-in dir. */
- inc_dirs = (char**)realloc(inc_dirs, (num_dirs + 1)*sizeof(char*));
+ inc_dirs = (char**)realloc(inc_dirs, (num_dirs + 1) * sizeof(char*));
/* Put the passed-in dir at the end of the list. */
inc_dirs[num_dirs - 1] = Util_strdup(dir);
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Compiler.h Sun May 1 23:50:24 2011
@@ -31,14 +31,14 @@ extern "C" {
* file exists after the attempt.
*/
chaz_bool_t
-chaz_CC_compile_exe(const char *source_path, const char *exe_path,
+chaz_CC_compile_exe(const char *source_path, const char *exe_path,
const char *code, size_t code_len);
/* Attempt to compile an object file. Return true if the object file
* exists after the attempt.
*/
chaz_bool_t
-chaz_CC_compile_obj(const char *source_path, const char *obj_path,
+chaz_CC_compile_obj(const char *source_path, const char *obj_path,
const char *code, size_t code_len);
/* Attempt to compile the supplied source code and return true if the
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/ConfWriter.c Sun May 1 23:50:24 2011
@@ -30,14 +30,12 @@
static FILE *charmony_fh = NULL;
void
-ConfWriter_init()
-{
+ConfWriter_init() {
return;
}
void
-ConfWriter_open_charmony_h(const char *charmony_start)
-{
+ConfWriter_open_charmony_h(const char *charmony_start) {
/* Open the filehandle. */
charmony_fh = fopen("charmony.h", "w+");
if (charmony_fh == NULL) {
@@ -46,27 +44,25 @@ ConfWriter_open_charmony_h(const char *c
/* Print supplied text (if any) along with warning, open include guard. */
if (charmony_start != NULL) {
- fwrite(charmony_start, sizeof(char), strlen(charmony_start),
- charmony_fh);
+ fwrite(charmony_start, sizeof(char), strlen(charmony_start),
+ charmony_fh);
}
fprintf(charmony_fh,
- "/* Header file auto-generated by Charmonizer. \n"
- " * DO NOT EDIT THIS FILE!!\n"
- " */\n\n"
- "#ifndef H_CHARMONY\n"
- "#define H_CHARMONY 1\n\n"
- );
+ "/* Header file auto-generated by Charmonizer. \n"
+ " * DO NOT EDIT THIS FILE!!\n"
+ " */\n\n"
+ "#ifndef H_CHARMONY\n"
+ "#define H_CHARMONY 1\n\n"
+ );
}
FILE*
-ConfWriter_get_charmony_fh(void)
-{
+ConfWriter_get_charmony_fh(void) {
return charmony_fh;
}
void
-ConfWriter_clean_up(void)
-{
+ConfWriter_clean_up(void) {
/* Clean up some temp files. */
remove("_charm.h");
OS_remove_exe("_charm_stat");
@@ -79,8 +75,7 @@ ConfWriter_clean_up(void)
}
void
-ConfWriter_append_conf(const char *fmt, ...)
-{
+ConfWriter_append_conf(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
@@ -89,8 +84,7 @@ ConfWriter_append_conf(const char *fmt,
}
void
-ConfWriter_start_short_names(void)
-{
+ConfWriter_start_short_names(void) {
ConfWriter_append_conf(
"\n#if defined(CHY_USE_SHORT_NAMES) "
"|| defined(CHAZ_USE_SHORT_NAMES)\n"
@@ -98,14 +92,12 @@ ConfWriter_start_short_names(void)
}
void
-ConfWriter_end_short_names(void)
-{
+ConfWriter_end_short_names(void) {
ConfWriter_append_conf("#endif /* USE_SHORT_NAMES */\n");
}
void
-ConfWriter_start_module(const char *module_name)
-{
+ConfWriter_start_module(const char *module_name) {
if (chaz_Util_verbosity > 0) {
printf("Running %s module...\n", module_name);
}
@@ -113,27 +105,23 @@ ConfWriter_start_module(const char *modu
}
void
-ConfWriter_end_module(void)
-{
+ConfWriter_end_module(void) {
ConfWriter_append_conf("\n");
}
void
-ConfWriter_shorten_macro(const char *sym)
-{
- ConfWriter_append_conf(" #define %s CHY_%s\n", sym, sym);
+ConfWriter_shorten_macro(const char *sym) {
+ ConfWriter_append_conf(" #define %s CHY_%s\n", sym, sym);
}
void
-ConfWriter_shorten_typedef(const char *sym)
-{
- ConfWriter_append_conf(" #define %s chy_%s\n", sym, sym);
+ConfWriter_shorten_typedef(const char *sym) {
+ ConfWriter_append_conf(" #define %s chy_%s\n", sym, sym);
}
void
-ConfWriter_shorten_function(const char *sym)
-{
- ConfWriter_append_conf(" #define %s chy_%s\n", sym, sym);
+ConfWriter_shorten_function(const char *sym) {
+ ConfWriter_append_conf(" #define %s chy_%s\n", sym, sym);
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Defines.h Sun May 1 23:50:24 2011
@@ -30,7 +30,7 @@ typedef int chaz_bool_t;
#define false 0
#endif
-#define CHAZ_QUOTE(x) #x "\n"
+#define CHAZ_QUOTE(x) #x "\n"
#if (defined(CHAZ_USE_SHORT_NAMES) || defined(CHY_USE_SHORT_NAMES))
#define QUOTE CHAZ_QUOTE
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Dir.c Sun May 1 23:50:24 2011
@@ -62,15 +62,14 @@ static char rmdir_code[] =
QUOTE( } );
static chaz_bool_t
-S_try_init_posix_mkdir(char *header)
-{
+S_try_init_posix_mkdir(char *header) {
size_t needed = sizeof(posix_mkdir_code) + 30;
char *code_buf = (char*)malloc(needed);
/* Attempt compilation. */
sprintf(code_buf, posix_mkdir_code, header);
- mkdir_available = CC_compile_exe("_charm_mkdir.c", "_charm_mkdir",
- code_buf, strlen(code_buf));
+ mkdir_available = CC_compile_exe("_charm_mkdir.c", "_charm_mkdir",
+ code_buf, strlen(code_buf));
/* Set vars on success. */
if (mkdir_available) {
@@ -88,10 +87,9 @@ S_try_init_posix_mkdir(char *header)
}
static chaz_bool_t
-S_try_init_win_mkdir()
-{
- mkdir_available = CC_compile_exe("_charm_mkdir.c", "_charm_mkdir",
- win_mkdir_code, strlen(win_mkdir_code));
+S_try_init_win_mkdir() {
+ mkdir_available = CC_compile_exe("_charm_mkdir.c", "_charm_mkdir",
+ win_mkdir_code, strlen(win_mkdir_code));
if (mkdir_available) {
strcpy(mkdir_command, "_mkdir");
Dir_mkdir_num_args = 1;
@@ -100,8 +98,7 @@ S_try_init_win_mkdir()
}
static void
-S_init_mkdir()
-{
+S_init_mkdir() {
if (Util_verbosity) {
printf("Attempting to compile _charm_mkdir utility...\n");
}
@@ -115,20 +112,18 @@ S_init_mkdir()
}
static chaz_bool_t
-S_try_init_rmdir(char *header)
-{
+S_try_init_rmdir(char *header) {
size_t needed = sizeof(posix_mkdir_code) + 30;
char *code_buf = (char*)malloc(needed);
sprintf(code_buf, rmdir_code, header);
- rmdir_available = CC_compile_exe("_charm_rmdir.c", "_charm_rmdir",
- code_buf, strlen(code_buf));
+ rmdir_available = CC_compile_exe("_charm_rmdir.c", "_charm_rmdir",
+ code_buf, strlen(code_buf));
free(code_buf);
return rmdir_available;
}
static void
-S_init_rmdir()
-{
+S_init_rmdir() {
if (Util_verbosity) {
printf("Attempting to compile _charm_rmdir utility...\n");
}
@@ -139,9 +134,8 @@ S_init_rmdir()
/* Compile _charm_mkdir and _charm_rmdir. */
void
-Dir_init(void)
-{
- if (!initialized) {
+Dir_init(void) {
+ if (!initialized) {
initialized = true;
S_init_mkdir();
S_init_rmdir();
@@ -149,8 +143,7 @@ Dir_init(void)
}
void
-Dir_clean_up(void)
-{
+Dir_clean_up(void) {
if (!Util_remove_and_verify("_charm_mkdir")) {
Util_die("Failed to remove '_charm_mkdir'");
}
@@ -160,15 +153,13 @@ Dir_clean_up(void)
}
chaz_bool_t
-Dir_mkdir(const char *filepath)
-{
+Dir_mkdir(const char *filepath) {
if (!initialized) { Dir_init(); }
return OS_run_local("_charm_mkdir ", filepath, NULL);
}
chaz_bool_t
-Dir_rmdir(const char *filepath)
-{
+Dir_rmdir(const char *filepath) {
if (!initialized) { Dir_init(); }
return OS_run_local("_charm_rmdir ", filepath, NULL);
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.c Sun May 1 23:50:24 2011
@@ -34,8 +34,8 @@ static char test_code[] = "int main() {
/* Keep a sorted, dynamically-sized array of names of all headers we've
* checked for so far.
*/
-static int cache_size = 0;
-static Header **header_cache = NULL;
+static int cache_size = 0;
+static Header **header_cache = NULL;
/* Comparison function to feed to qsort, bsearch, etc.
*/
@@ -45,7 +45,7 @@ S_compare_headers(const void *vptr_a, co
/* Run a test compilation and return a new Header object encapsulating the
* results.
*/
-static Header*
+static Header*
S_discover_header(const char *header_name);
/* Extend the cache, add this Header object to it, and sort.
@@ -60,8 +60,7 @@ static void
S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists);
void
-HeadCheck_init()
-{
+HeadCheck_init() {
Header *null_header = (Header*)malloc(sizeof(Header));
/* Create terminating record for the dynamic array of Header objects. */
@@ -73,8 +72,7 @@ HeadCheck_init()
}
chaz_bool_t
-HeadCheck_check_header(const char *header_name)
-{
+HeadCheck_check_header(const char *header_name) {
Header *header;
Header key;
Header *fake = &key;
@@ -83,9 +81,9 @@ HeadCheck_check_header(const char *heade
/* Fake up a key to feed to bsearch; see if the header's already there. */
key.name = (char*)header_name;
key.exists = false;
- header_ptr = (Header**)bsearch(&fake, header_cache, cache_size,
- sizeof(void*), S_compare_headers);
-
+ header_ptr = (Header**)bsearch(&fake, header_cache, cache_size,
+ sizeof(void*), S_compare_headers);
+
/* If it's not there, go try a test compile. */
if (header_ptr == NULL) {
header = S_discover_header(header_name);
@@ -99,8 +97,7 @@ HeadCheck_check_header(const char *heade
}
chaz_bool_t
-HeadCheck_check_many_headers(const char **header_names)
-{
+HeadCheck_check_many_headers(const char **header_names) {
chaz_bool_t success;
int i;
char *code_buf = Util_strdup("");
@@ -132,17 +129,19 @@ HeadCheck_check_many_headers(const char
return success;
}
-static char contains_code[] =
+static char contains_code[] =
QUOTE( #include <stddef.h> )
QUOTE( %s )
QUOTE( int main() { return offsetof(%s, %s); } );
chaz_bool_t
HeadCheck_contains_member(const char *struct_name, const char *member,
- const char *includes)
-{
- long needed = sizeof(contains_code) + strlen(struct_name)
- + strlen(member) + strlen(includes) + 10;
+ const char *includes) {
+ long needed = sizeof(contains_code)
+ + strlen(struct_name)
+ + strlen(member)
+ + strlen(includes)
+ + 10;
char *buf = (char*)malloc(needed);
chaz_bool_t retval;
sprintf(buf, contains_code, includes, struct_name, member);
@@ -157,18 +156,17 @@ S_compare_headers(const void *vptr_a, co
Header **const b = (Header**)vptr_b;
/* (NULL is "greater than" any string.) */
- if ((*a)->name == NULL) { return 1; }
+ if ((*a)->name == NULL) { return 1; }
else if ((*b)->name == NULL) { return -1; }
else { return strcmp((*a)->name, (*b)->name); }
}
-static Header*
-S_discover_header(const char *header_name)
-{
+static Header*
+S_discover_header(const char *header_name) {
Header* header = (Header*)malloc(sizeof(Header));
size_t needed = strlen(header_name) + sizeof(test_code) + 50;
- char *include_test = (char*)malloc(needed);
-
+ char *include_test = (char*)malloc(needed);
+
/* Assign. */
header->name = Util_strdup(header_name);
@@ -181,20 +179,19 @@ S_discover_header(const char *header_nam
}
static void
-S_add_to_cache(Header *header)
-{
+S_add_to_cache(Header *header) {
/* Realloc array -- inefficient, but this isn't a bottleneck. */
cache_size++;
- header_cache = (Header**)realloc(header_cache, (cache_size * sizeof(void*)));
- header_cache[ cache_size - 1 ] = header;
+ header_cache = (Header**)realloc(header_cache,
+ (cache_size * sizeof(void*)));
+ header_cache[cache_size - 1] = header;
/* Keep the list of headers sorted. */
qsort(header_cache, cache_size, sizeof(*header_cache), S_compare_headers);
}
static void
-S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists)
-{
+S_maybe_add_to_cache(const char *header_name, chaz_bool_t exists) {
Header *header;
Header key;
Header *fake = &key;
@@ -202,9 +199,9 @@ S_maybe_add_to_cache(const char *header_
/* Fake up a key and bsearch for it. */
key.name = (char*)header_name;
key.exists = exists;
- header = (Header*)bsearch(&fake, header_cache, cache_size,
- sizeof(void*), S_compare_headers);
-
+ header = (Header*)bsearch(&fake, header_cache, cache_size,
+ sizeof(void*), S_compare_headers);
+
/* We've already done the test compile, so skip that step and add it. */
if (header == NULL) {
header = (Header*)malloc(sizeof(Header));
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/HeaderChecker.h Sun May 1 23:50:24 2011
@@ -18,7 +18,7 @@
*/
#ifndef H_CHAZ_HEAD_CHECK
-#define H_CHAZ_HEAD_CHECK
+#define H_CHAZ_HEAD_CHECK
#ifdef __cplusplus
extern "C" {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.c Sun May 1 23:50:24 2011
@@ -50,8 +50,7 @@ static chaz_bool_t charm_run_initialized
static chaz_bool_t charm_run_ok = false;
void
-OS_init()
-{
+OS_init() {
if (Util_verbosity) {
printf("Initializing Charmonizer/Core/OperatingSystem...\n");
}
@@ -60,8 +59,7 @@ OS_init()
}
static void
-S_probe_dev_null(void)
-{
+S_probe_dev_null(void) {
if (Util_verbosity) {
printf("Trying to find a bit-bucket a la /dev/null...\n");
}
@@ -71,8 +69,8 @@ S_probe_dev_null(void)
#else
{
char *const options[] = {
- "/dev/null",
- "/dev/nul",
+ "/dev/null",
+ "/dev/nul",
NULL
};
int i;
@@ -92,30 +90,26 @@ S_probe_dev_null(void)
}
void
-OS_clean_up(void)
-{
+OS_clean_up(void) {
OS_remove_exe("_charm_run");
}
const char*
-OS_exe_ext(void)
-{
+OS_exe_ext(void) {
return exe_ext;
}
const char*
-OS_obj_ext(void)
-{
+OS_obj_ext(void) {
return obj_ext;
}
const char*
-OS_dev_null(void)
-{
+OS_dev_null(void) {
return dev_null;
}
-static char charm_run_code[] =
+static char charm_run_code[] =
QUOTE( #include <stdio.h> )
QUOTE( #include <stdlib.h> )
QUOTE( #include <string.h> )
@@ -126,7 +120,7 @@ static char charm_run_code[] =
QUOTE( size_t command_len = 1; /* Terminating null. */ )
QUOTE( int i; )
QUOTE( int retval; )
- /* Rebuild command line args. */
+ /* Rebuild command line args. */
QUOTE( for (i = 1; i < argc; i++) { )
QUOTE( command_len += strlen(argv[i]) + 1; )
QUOTE( } )
@@ -138,29 +132,28 @@ static char charm_run_code[] =
QUOTE( for (i = 1; i < argc; i++) { )
QUOTE( strcat( strcat(command, " "), argv[i] ); )
QUOTE( } )
- /* Redirect all output to /dev/null or equivalent. */
+ /* Redirect all output to /dev/null or equivalent. */
QUOTE( freopen("%s", "w", stdout); )
QUOTE( freopen("%s", "w", stderr); )
- /* Run commmand and return its value to parent. */
+ /* Run commmand and return its value to parent. */
QUOTE( retval = system(command); )
QUOTE( free(command); )
QUOTE( return retval; )
QUOTE( } );
static void
-S_build_charm_run()
-{
+S_build_charm_run() {
chaz_bool_t compile_succeeded = false;
const char *dev_null = OS_dev_null();
size_t needed = sizeof(charm_run_code)
- + strlen(dev_null)
- + strlen(dev_null)
- + 20;
+ + strlen(dev_null)
+ + strlen(dev_null)
+ + 20;
char *code = (char*)malloc(needed);
sprintf(code, charm_run_code, dev_null, dev_null);
- compile_succeeded = CC_compile_exe("_charm_run.c", "_charm_run",
- code, strlen(code));
+ compile_succeeded = CC_compile_exe("_charm_run.c", "_charm_run",
+ code, strlen(code));
if (!compile_succeeded) {
Util_die("failed to compile _charm_run helper utility");
}
@@ -171,8 +164,7 @@ S_build_charm_run()
}
void
-OS_remove_exe(char *name)
-{
+OS_remove_exe(char *name) {
char *exe_name = (char*)malloc(strlen(name) + strlen(exe_ext) + 1);
sprintf(exe_name, "%s%s", name, exe_ext);
remove(exe_name);
@@ -180,8 +172,7 @@ OS_remove_exe(char *name)
}
void
-OS_remove_obj(char *name)
-{
+OS_remove_obj(char *name) {
char *obj_name = (char*)malloc(strlen(name) + strlen(obj_ext) + 1);
sprintf(obj_name, "%s%s", name, obj_ext);
remove(obj_name);
@@ -189,8 +180,7 @@ OS_remove_obj(char *name)
}
int
-OS_run_local(char *arg1, ...)
-{
+OS_run_local(char *arg1, ...) {
va_list args;
size_t len = strlen(local_command_start) + strlen(arg1);
char *command = (char*)malloc(len + 1);
@@ -214,10 +204,9 @@ OS_run_local(char *arg1, ...)
}
int
-OS_run_quietly(const char *command)
-{
+OS_run_quietly(const char *command) {
int retval = 1;
-
+
if (!charm_run_initialized) {
charm_run_initialized = true;
S_build_charm_run();
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/OperatingSystem.h Sun May 1 23:50:24 2011
@@ -38,14 +38,14 @@ chaz_OS_remove_obj(char *name);
/* Concatenate all arguments in a NULL-terminated list into a single command
* string, prepend the appropriate prefix, and invoke via system().
*/
-int
+int
chaz_OS_run_local(char *arg1, ...);
/* Invoke a command and attempt to suppress output from both stdout and stderr
* (as if they had been sent to /dev/null). If it's not possible to run the
* command quietly, run it anyway.
*/
-int
+int
chaz_OS_run_quietly(const char *command);
/* Return the extension for an executable on this system.
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Stat.c Sun May 1 23:50:24 2011
@@ -35,8 +35,7 @@ static void
S_init();
void
-Stat_stat(const char *filepath, Stat *target)
-{
+Stat_stat(const char *filepath, Stat *target) {
char *stat_output;
size_t output_len;
@@ -68,7 +67,7 @@ Stat_stat(const char *filepath, Stat *ta
}
/* Source code for the _charm_stat utility. */
-static char charm_stat_code[] =
+static char charm_stat_code[] =
QUOTE( #include <stdio.h> )
QUOTE( #include <sys/stat.h> )
QUOTE( int main(int argc, char **argv) { )
@@ -82,8 +81,7 @@ static char charm_stat_code[] =
QUOTE( } );
static void
-S_init()
-{
+S_init() {
/* Only try this once. */
initialized = true;
if (Util_verbosity) {
@@ -93,10 +91,9 @@ S_init()
/* Bail if sys/stat.h isn't available. */
if (!HeadCheck_check_header("sys/stat.h")) { return; }
-
/* If the compile succeeds, open up for business. */
- stat_available = CC_compile_exe("_charm_stat.c", "_charm_stat",
- charm_stat_code, strlen(charm_stat_code));
+ stat_available = CC_compile_exe("_charm_stat.c", "_charm_stat",
+ charm_stat_code, strlen(charm_stat_code));
remove("_charm_stat.c");
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.c Sun May 1 23:50:24 2011
@@ -26,8 +26,7 @@
int Util_verbosity = 1;
void
-Util_write_file(const char *filename, const char *content)
-{
+Util_write_file(const char *filename, const char *content) {
FILE *fh = fopen(filename, "w+");
size_t content_len = strlen(content);
if (fh == NULL) {
@@ -40,8 +39,7 @@ Util_write_file(const char *filename, co
}
char*
-Util_slurp_file(const char *file_path, size_t *len_ptr)
-{
+Util_slurp_file(const char *file_path, size_t *len_ptr) {
FILE *const file = fopen(file_path, "r");
char *contents;
size_t len;
@@ -70,7 +68,7 @@ Util_slurp_file(const char *file_path, s
/* Weak error check, because CRLF might result in fewer chars read. */
if (check_val <= 0) {
Util_die("Tried to read %d characters of '%s', got %d", (int)len,
- file_path, check_val);
+ file_path, check_val);
}
/* Set length pointer for benefit of caller. */
@@ -84,9 +82,8 @@ Util_slurp_file(const char *file_path, s
return contents;
}
-long
-Util_flength(void *file)
-{
+long
+Util_flength(void *file) {
FILE *f = (FILE*)file;
const long bookmark = ftell(f);
long check_val;
@@ -106,8 +103,7 @@ Util_flength(void *file)
}
char*
-Util_strdup(const char *string)
-{
+Util_strdup(const char *string) {
size_t len = strlen(string);
char *copy = (char*)malloc(len + 1);
strncpy(copy, string, len);
@@ -115,9 +111,8 @@ Util_strdup(const char *string)
return copy;
}
-void
-Util_die(const char* format, ...)
-{
+void
+Util_die(const char* format, ...) {
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
@@ -126,9 +121,8 @@ Util_die(const char* format, ...)
exit(1);
}
-void
-Util_warn(const char* format, ...)
-{
+void
+Util_warn(const char* format, ...) {
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
@@ -137,8 +131,7 @@ Util_warn(const char* format, ...)
}
int
-Util_remove_and_verify(const char *file_path)
-{
+Util_remove_and_verify(const char *file_path) {
/* Try to remove the file. */
remove(file_path);
@@ -147,8 +140,7 @@ Util_remove_and_verify(const char *file_
}
int
-Util_can_open_file(const char *file_path)
-{
+Util_can_open_file(const char *file_path) {
FILE *garbage_fh;
/* Use fopen as a portable test for the existence of a file. */
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Core/Util.h Sun May 1 23:50:24 2011
@@ -38,22 +38,22 @@ chaz_Util_write_file(const char *filenam
/* Read an entire file into memory.
*/
-char*
+char*
chaz_Util_slurp_file(const char *file_path, size_t *len_ptr);
/* Return a newly allocated copy of a NULL-terminated string.
*/
-char*
+char*
chaz_Util_strdup(const char *string);
/* Get the length of a file (may overshoot on text files under DOS).
*/
-long
+long
chaz_Util_flength(void *file);
/* Print an error message to stderr and exit.
*/
-void
+void
chaz_Util_die(const char *format, ...);
/* Print an error message to stderr.
@@ -76,15 +76,15 @@ int
chaz_Util_can_open_file(const char *file_path);
#ifdef CHAZ_USE_SHORT_NAMES
- #define Util_verbosity chaz_Util_verbosity
- #define Util_write_file chaz_Util_write_file
- #define Util_slurp_file chaz_Util_slurp_file
- #define Util_flength chaz_Util_flength
- #define Util_die chaz_Util_die
- #define Util_warn chaz_Util_warn
+ #define Util_verbosity chaz_Util_verbosity
+ #define Util_write_file chaz_Util_write_file
+ #define Util_slurp_file chaz_Util_slurp_file
+ #define Util_flength chaz_Util_flength
+ #define Util_die chaz_Util_die
+ #define Util_warn chaz_Util_warn
#define Util_strdup chaz_Util_strdup
- #define Util_remove_and_verify chaz_Util_remove_and_verify
- #define Util_can_open_file chaz_Util_can_open_file
+ #define Util_remove_and_verify chaz_Util_remove_and_verify
+ #define Util_can_open_file chaz_Util_can_open_file
#endif
#ifdef __cplusplus
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.c Sun May 1 23:50:24 2011
@@ -33,9 +33,8 @@ static void
S_write_charm_h();
void
-Probe_init(const char *cc_command, const char *cc_flags,
- const char *charmony_start)
-{
+Probe_init(const char *cc_command, const char *cc_flags,
+ const char *charmony_start) {
/* Dispatch other initializers. */
OS_init();
CC_init(cc_command, cc_flags);
@@ -48,8 +47,7 @@ Probe_init(const char *cc_command, const
}
void
-Probe_clean_up()
-{
+Probe_clean_up() {
if (Util_verbosity) { printf("Cleaning up...\n"); }
/* Dispatch various clean up routines. */
@@ -62,14 +60,12 @@ Probe_clean_up()
}
void
-Probe_set_verbosity(int level)
-{
+Probe_set_verbosity(int level) {
Util_verbosity = level;
}
FILE*
-Probe_get_charmony_fh(void)
-{
+Probe_get_charmony_fh(void) {
return ConfWriter_get_charmony_fh();
}
@@ -81,8 +77,7 @@ static char charm_h_code[] =
QUOTE( #endif );
static void
-S_write_charm_h()
-{
+S_write_charm_h() {
Util_write_file("_charm.h", charm_h_code);
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe.h Sun May 1 23:50:24 2011
@@ -32,7 +32,7 @@ extern "C" {
* @param charmony_start Code to prepend onto the front of charmony.h
*/
void
-chaz_Probe_init(const char *cc_command, const char *cc_flags,
+chaz_Probe_init(const char *cc_command, const char *cc_flags,
const char *charmony_start);
/* Clean up the Charmonizer environment -- deleting tempfiles, etc. This
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.c Sun May 1 23:50:24 2011
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
-static char osatomic_casptr_code[] =
+static char osatomic_casptr_code[] =
QUOTE( #include <libkern/OSAtomic.h> )
QUOTE( #include <libkern/OSAtomic.h> )
QUOTE( int main() { )
@@ -37,8 +37,7 @@ static char osatomic_casptr_code[] =
QUOTE( } );
void
-AtomicOps_run(void)
-{
+AtomicOps_run(void) {
chaz_bool_t has_libkern_osatomic_h = false;
chaz_bool_t has_osatomic_cas_ptr = false;
chaz_bool_t has_sys_atomic_h = false;
@@ -53,7 +52,7 @@ AtomicOps_run(void)
/* Check for OSAtomicCompareAndSwapPtr, introduced in later versions
* of OSAtomic.h. */
has_osatomic_cas_ptr = CC_test_compile(osatomic_casptr_code,
- strlen(osatomic_casptr_code));
+ strlen(osatomic_casptr_code));
if (has_osatomic_cas_ptr) {
ConfWriter_append_conf("#define CHY_HAS_OSATOMIC_CAS_PTR\n");
}
@@ -62,13 +61,13 @@ AtomicOps_run(void)
has_sys_atomic_h = true;
ConfWriter_append_conf("#define CHY_HAS_SYS_ATOMIC_H\n");
}
- if ( HeadCheck_check_header("windows.h")
+ if (HeadCheck_check_header("windows.h")
&& HeadCheck_check_header("intrin.h")
- ) {
+ ) {
has_intrin_h = true;
ConfWriter_append_conf("#define CHY_HAS_INTRIN_H\n");
}
-
+
/* Shorten */
ConfWriter_start_short_names();
if (has_libkern_osatomic_h) {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/AtomicOps.h Sun May 1 23:50:24 2011
@@ -18,7 +18,7 @@
*/
#ifndef H_CHAZ_ATOMICOPS
-#define H_CHAZ_ATOMICOPS
+#define H_CHAZ_ATOMICOPS
#ifdef __cplusplus
extern "C" {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.c Sun May 1 23:50:24 2011
@@ -26,8 +26,7 @@
#include <stdlib.h>
void
-DirManip_run(void)
-{
+DirManip_run(void) {
FILE *f;
char dir_sep[3];
chaz_bool_t remove_zaps_dirs = false;
@@ -49,13 +48,17 @@ DirManip_run(void)
/* Check for members in struct dirent. */
if (has_dirent_h) {
- has_dirent_d_namlen = HeadCheck_contains_member("struct dirent",
- "d_namlen", "#include <sys/types.h>\n#include <dirent.h>");
+ has_dirent_d_namlen = HeadCheck_contains_member(
+ "struct dirent", "d_namlen",
+ "#include <sys/types.h>\n#include <dirent.h>"
+ );
if (has_dirent_d_namlen) {
ConfWriter_append_conf("#define CHY_HAS_DIRENT_D_NAMLEN\n", dir_sep);
}
- has_dirent_d_type = HeadCheck_contains_member("struct dirent",
- "d_type", "#include <sys/types.h>\n#include <dirent.h>");
+ has_dirent_d_type = HeadCheck_contains_member(
+ "struct dirent", "d_type",
+ "#include <sys/types.h>\n#include <dirent.h>"
+ );
if (has_dirent_d_type) {
ConfWriter_append_conf("#define CHY_HAS_DIRENT_D_TYPE\n", dir_sep);
}
@@ -64,13 +67,13 @@ DirManip_run(void)
if (Dir_mkdir_num_args == 2) {
/* It's two args, but the command isn't "mkdir". */
ConfWriter_append_conf("#define chy_makedir(_dir, _mode) %s(_dir, _mode)\n",
- Dir_mkdir_command);
+ Dir_mkdir_command);
ConfWriter_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 0\n");
}
else if (Dir_mkdir_num_args == 1) {
/* It's one arg... mode arg will be ignored. */
ConfWriter_append_conf("#define chy_makedir(_dir, _mode) %s(_dir)\n",
- Dir_mkdir_command);
+ Dir_mkdir_command);
ConfWriter_append_conf("#define CHY_MAKEDIR_MODE_IGNORED 1\n");
}
@@ -78,20 +81,20 @@ DirManip_run(void)
Dir_mkdir("_charm_test_dir_orig");
/* Try to create files under the new directory. */
- if ( (f = fopen("_charm_test_dir_orig\\backslash", "w")) != NULL) {
+ if ((f = fopen("_charm_test_dir_orig\\backslash", "w")) != NULL) {
fclose(f);
}
- if ( (f = fopen("_charm_test_dir_orig/slash", "w")) != NULL) {
+ if ((f = fopen("_charm_test_dir_orig/slash", "w")) != NULL) {
fclose(f);
}
/* Rename the directory, then see which file we can get to. */
rename("_charm_test_dir_orig", "_charm_test_dir_mod");
- if ( (f = fopen("_charm_test_dir_mod\\backslash", "r")) != NULL) {
+ if ((f = fopen("_charm_test_dir_mod\\backslash", "r")) != NULL) {
fclose(f);
strcpy(dir_sep, "\\\\");
}
- else if ( (f = fopen("_charm_test_dir_mod/slash", "r")) != NULL) {
+ else if ((f = fopen("_charm_test_dir_mod/slash", "r")) != NULL) {
fclose(f);
strcpy(dir_sep, "/");
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/DirManip.h Sun May 1 23:50:24 2011
@@ -18,7 +18,7 @@
*/
#ifndef H_CHAZ_DIRMANIP
-#define H_CHAZ_DIRMANIP
+#define H_CHAZ_DIRMANIP
#ifdef __cplusplus
extern "C" {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.c Sun May 1 23:50:24 2011
@@ -25,8 +25,7 @@
#include <stdlib.h>
void
-Floats_run(void)
-{
+Floats_run(void) {
ConfWriter_start_module("Floats");
ConfWriter_append_conf(
@@ -56,7 +55,7 @@ Floats_run(void)
ConfWriter_shorten_macro("F32_NEGINF");
ConfWriter_shorten_macro("F32_NAN");
ConfWriter_end_short_names();
-
+
ConfWriter_end_module();
}
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Floats.h Sun May 1 23:50:24 2011
@@ -48,7 +48,7 @@ extern "C" {
/* Run the Floats module.
*/
-void
+void
chaz_Floats_run(void);
#ifdef CHAZ_USE_SHORT_NAMES
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.c Sun May 1 23:50:24 2011
@@ -34,7 +34,7 @@ static char iso_func_code[] =
QUOTE( } );
/* Code for verifying GNU func macro. */
-static char gnuc_func_code[] =
+static char gnuc_func_code[] =
QUOTE( #include "_charm.h" )
QUOTE( int main() { )
QUOTE( Charm_Setup; )
@@ -54,7 +54,7 @@ static char inline_code[] =
static char*
S_try_inline(const char *keyword, size_t *output_len) {
- char code[ sizeof(inline_code) + 30 ];
+ char code[sizeof(inline_code) + 30];
sprintf(code, inline_code, keyword);
return CC_capture_output(code, strlen(code), output_len);
}
@@ -67,8 +67,7 @@ static const char* inline_options[] = {
static int num_inline_options = sizeof(inline_options) / sizeof(void*);
void
-FuncMacro_run(void)
-{
+FuncMacro_run(void) {
int i;
char *output;
size_t output_len;
@@ -78,10 +77,10 @@ FuncMacro_run(void)
chaz_bool_t has_inline = false;
ConfWriter_start_module("FuncMacro");
-
+
/* Check for ISO func macro. */
- output = CC_capture_output(iso_func_code, strlen(iso_func_code),
- &output_len);
+ output = CC_capture_output(iso_func_code, strlen(iso_func_code),
+ &output_len);
if (output != NULL && strncmp(output, "main", 4) == 0) {
has_funcmac = true;
has_iso_funcmac = true;
@@ -89,8 +88,8 @@ FuncMacro_run(void)
free(output);
/* Check for GNUC func macro. */
- output = CC_capture_output(gnuc_func_code, strlen(gnuc_func_code),
- &output_len);
+ output = CC_capture_output(gnuc_func_code, strlen(gnuc_func_code),
+ &output_len);
if (output != NULL && strncmp(output, "main", 4) == 0) {
has_funcmac = true;
has_gnuc_funcmac = true;
@@ -99,9 +98,9 @@ FuncMacro_run(void)
/* Write out common defines. */
if (has_funcmac) {
- const char *macro_text = has_iso_funcmac
- ? "__func__"
- : "__FUNCTION__";
+ const char *macro_text = has_iso_funcmac
+ ? "__func__"
+ : "__FUNCTION__";
ConfWriter_append_conf(
"#define CHY_HAS_FUNC_MACRO\n"
"#define CHY_FUNC_MACRO %s\n",
@@ -111,14 +110,14 @@ FuncMacro_run(void)
/* Write out specific defines. */
if (has_iso_funcmac) {
- ConfWriter_append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n");
+ ConfWriter_append_conf("#define CHY_HAS_ISO_FUNC_MACRO\n");
}
if (has_gnuc_funcmac) {
ConfWriter_append_conf("#define CHY_HAS_GNUC_FUNC_MACRO\n");
}
/* Check for inline keyword. */
-
+
for (i = 0; i < num_inline_options; i++) {
const char *inline_option = inline_options[i];
output = S_try_inline(inline_option, &output_len);
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/FuncMacro.h Sun May 1 23:50:24 2011
@@ -18,7 +18,7 @@
*/
#ifndef H_CHAZ_FUNC_MACRO
-#define H_CHAZ_FUNC_MACRO
+#define H_CHAZ_FUNC_MACRO
#ifdef __cplusplus
extern "C" {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.c Sun May 1 23:50:24 2011
@@ -93,20 +93,18 @@ char *win_headers[] = {
};
chaz_bool_t
-Headers_check(const char *header_name)
-{
+Headers_check(const char *header_name) {
return HeadCheck_check_header(header_name);
}
void
-Headers_run(void)
-{
+Headers_run(void) {
int i;
chaz_bool_t has_posix = false;
chaz_bool_t has_c89 = false;
keeper_count = 0;
-
+
ConfWriter_start_module("Headers");
/* Try for all POSIX headers in one blast. */
@@ -189,8 +187,7 @@ Headers_run(void)
}
static void
-S_keep(const char *header_name)
-{
+S_keep(const char *header_name) {
if (keeper_count >= MAX_KEEPER_COUNT) {
Util_die("Too many keepers -- increase MAX_KEEPER_COUNT");
}
@@ -202,7 +199,7 @@ static void
S_encode_affirmation(const char *header_name) {
char *buf, *buf_end;
size_t len = strlen(header_name) + sizeof("HAS_");
-
+
/* Grow buffer and start off with "HAS_". */
if (aff_buf_size < len + 1) {
free(aff_buf);
@@ -212,15 +209,15 @@ S_encode_affirmation(const char *header_
strcpy(aff_buf, "HAS_");
/* Transform one char at a time. */
- for(buf = aff_buf + sizeof("HAS_") - 1, buf_end = aff_buf + len;
- buf < buf_end;
- header_name++, buf++
- ) {
+ for (buf = aff_buf + sizeof("HAS_") - 1, buf_end = aff_buf + len;
+ buf < buf_end;
+ header_name++, buf++
+ ) {
if (*header_name == '\0') {
*buf = '\0';
break;
}
- else if (isalnum(*header_name)){
+ else if (isalnum(*header_name)) {
*buf = toupper(*header_name);
}
else {
Modified: incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.h?rev=1098445&r1=1098444&r2=1098445&view=diff
==============================================================================
--- incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.h (original)
+++ incubator/lucy/trunk/charmonizer/src/Charmonizer/Probe/Headers.h Sun May 1 23:50:24 2011
@@ -85,7 +85,7 @@ chaz_Headers_check(const char *header_na
*
* HAS_PTHREAD_H
*/
-void
+void
chaz_Headers_run(void);
#ifdef CHAZ_USE_SHORT_NAMES