You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by pm...@apache.org on 2014/12/20 07:29:57 UTC
[1/3] incubator-corinthia git commit: README.md Add more project links
Repository: incubator-corinthia
Updated Branches:
refs/heads/stable d72983d4d -> 614eabac2
README.md Add more project links
The operational wiki and JIRA links are added. The Facebook and Twitter
connections are also included.
Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/c602892b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/c602892b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/c602892b
Branch: refs/heads/stable
Commit: c602892b76d7222ec6e5123f892c0cb4c7378ea7
Parents: d72983d
Author: Dennis Hamilton <or...@apache.org>
Authored: Fri Dec 19 09:00:51 2014 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Fri Dec 19 09:00:51 2014 -0800
----------------------------------------------------------------------
README.md | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/c602892b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 16d889b..6d13b95 100644
--- a/README.md
+++ b/README.md
@@ -26,13 +26,17 @@ from the email address to receive list messages at. The reply from
the list robot to that address provides confirmation instructions and
information on managing the subscription.
-There is a [Corinthia incubator web
-site](http://corinthia.incubator.apache.org/) and there will be a project
-wiki and JIRA issue tracker.
+There are a [Corinthia incubator web
+site](http://corinthia.incubator.apache.org/), a
+[project wiki](http://incubator.apache.org/projects/corinthia.html), and a
+[JIRA issue tracker](https://issues.apache.org/jira/browse/COR).
+
The sites and documentation for this project are at a preliminary
stage. Content will be moved to Apache and improved as incubation moves
-ahead.
+along.
+
+Meanwhile, there is a [Facebook page](https://www.facebook.com/CorinthiaProject) and a Twitter account, [@ApacheCorinthia](https://twitter.com/ApacheCorinthia).
# License
[2/3] incubator-corinthia git commit: .gitignore excluding Microsoft
ephemeral artifacts
Posted by pm...@apache.org.
.gitignore excluding Microsoft ephemeral artifacts
The .gitignore is expanded to include exclusions that GitHub provides by
default when creating a git repository used for Windows development.
This annotated version includes some miscellaneous catches, such as
temporary files produced by a variety of editors. In addition,
exclusion of Visual Studio Solution and Project files is added, with
explanatory comment.
Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/248faa5c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/248faa5c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/248faa5c
Branch: refs/heads/stable
Commit: 248faa5c6bb45524faee8de36271d4c76bd67f7b
Parents: c602892
Author: Dennis Hamilton <or...@apache.org>
Authored: Fri Dec 19 09:15:21 2014 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Fri Dec 19 09:15:21 2014 -0800
----------------------------------------------------------------------
.gitignore | 219 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 219 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/248faa5c/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 33ddc9f..e653306 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,224 @@
+# .gitignore UTF-8 2014-12-29
+#
+# CORINTHIA/ROOT
+# ==============
+#
+# .GITIGNORE FOR KEEPING BUILDS OUT OF THE REPOSITORY
+#
+# This .gitignore file is designed to eliminate build setups and their
+# output from being committed to and carried in the repository. This is
+# part of a structure where anyone can do multiple flavors of builds
+# along-side the source without cluttering the repository iself.
+
+## ORIGINAL EXCLUSIONS
+## -------------------
+
.DS_Store
DerivedData/
project.xcworkspace/
xcuserdata/
*.xccheckout
+
+## ELIMINATION OF VISUAL STUDIO SOLUTIONS
+## --------------------------------------
+
+# Do not include working solutions in the repository tree. Shared
+# solutions are obtained from archives so working solutions are only local,
+# preventing cross-pollution of settings and configurations, debugging
+# preferences, etc.
+
+*.sln
+*.vcxproj
+*.vcxproj.filters
+
+## ELIMINATION OF VISUAL STUDIO ARTIFACTS (Based on GitHub List)
+## -------------------------------------------------------------
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons. These are
+## automatically included when a GitHub creation occurs and
+## Microsoft platforms are targeted.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+build/
+bld/
+[Bb]in/
+[Oo]bj/
+
+# Roslyn cache directories
+*.ide/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+#NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding addin-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be
+# unencrypted
+*.pubxml
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# If using the old MSBuild-Integrated Package Restore, uncomment this:
+#!**/packages/repositories.config
+
+# Windows Azure Build Output
+csx/
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# *** end of .gitignore ***
[3/3] incubator-corinthia git commit: DFAddDirContents: Don't use
DFArray or DFError
Posted by pm...@apache.org.
DFAddDirContents: Don't use DFArray or DFError
Avoid using DFArray in DFAddDirContents, as a step towards removing the
dependency of the platform module upon core. We instead use the
DFDirEntryList type, which is simply a linked list of string values
which is manipulated manually, without requiring any convenience
functions defined in core.
This function also no longer takes a DFError object as a paramater,
though others in DFPlatform.h still do.
Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/614eabac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/614eabac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/614eabac
Branch: refs/heads/stable
Commit: 614eabac2e4bb8e82a3c16bfa6ece2eb45434989
Parents: 248faa5
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Sat Dec 20 13:26:02 2014 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Sat Dec 20 13:26:02 2014 +0700
----------------------------------------------------------------------
DocFormats/core/src/lib/DFFilesystem.c | 34 +++++++++++++++++++---
DocFormats/platform/headers/DFPlatform.h | 9 +++++-
DocFormats/platform/src/Unix.c | 23 +++++++++++----
DocFormats/platform/src/Win32.c | 42 +++++++++++++++++++++++----
consumers/dfutil/src/main.c | 2 ++
5 files changed, 95 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/614eabac/DocFormats/core/src/lib/DFFilesystem.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFFilesystem.c b/DocFormats/core/src/lib/DFFilesystem.c
index 24afc0c..b5da8ec 100644
--- a/DocFormats/core/src/lib/DFFilesystem.c
+++ b/DocFormats/core/src/lib/DFFilesystem.c
@@ -160,15 +160,41 @@ int DFDeleteFile(const char *path, DFError **error)
return ok;
}
-const char **DFContentsOfDirectory(const char *path, int recursive, DFError **error)
+static void freeDirEntryList(DFDirEntryList *list)
+{
+ DFDirEntryList *next;
+ for (DFDirEntryList *l = list; l != NULL; l = next) {
+ next = l->next;
+ free(l->name);
+ free(l);
+ }
+}
+
+static DFArray *arrayFromDirEntryList(DFDirEntryList *list)
{
- const char **entries = NULL;
DFArray *array = DFArrayNew((DFCopyFunction)strdup,(DFFreeFunction)free);
+ for (DFDirEntryList *l = list; l != NULL; l = l->next)
+ DFArrayAppend(array,l->name);
+ return array;
+}
- if (DFAddDirContents(path,"",recursive,array,error))
- entries = DFStringArrayFlatten(array);
+const char **DFContentsOfDirectory(const char *path, int recursive, DFError **error)
+{
+ DFDirEntryList *list = NULL;
+ DFDirEntryList **listptr = &list;
+ char *errmsg = NULL;
+
+ if (!DFAddDirContents(path,"",recursive,&listptr,&errmsg)) {
+ DFErrorFormat(error,"%s",errmsg);
+ free(errmsg);
+ freeDirEntryList(list);
+ return NULL;
+ }
+ DFArray *array = arrayFromDirEntryList(list);
+ const char **entries = DFStringArrayFlatten(array);
DFArrayRelease(array);
+ freeDirEntryList(list);
return entries;
}
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/614eabac/DocFormats/platform/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/headers/DFPlatform.h b/DocFormats/platform/headers/DFPlatform.h
index 0719c33..8f858cc 100755
--- a/DocFormats/platform/headers/DFPlatform.h
+++ b/DocFormats/platform/headers/DFPlatform.h
@@ -19,8 +19,15 @@
#include "DFArray.h"
#include <stddef.h>
+typedef struct DFDirEntryList DFDirEntryList;
+
+struct DFDirEntryList {
+ char *name;
+ DFDirEntryList *next;
+};
+
int DFMkdirIfAbsent(const char *path, DFError **error);
-int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFArray *array, DFError **error);
+int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFDirEntryList ***list, char **errmsg);
int DFGetImageDimensions(const void *data, size_t len, const char *ext,
unsigned int *width, unsigned int *height, DFError **error);
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/614eabac/DocFormats/platform/src/Unix.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/src/Unix.c b/DocFormats/platform/src/Unix.c
index e4ad42f..27c7019 100644
--- a/DocFormats/platform/src/Unix.c
+++ b/DocFormats/platform/src/Unix.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#include <sys/stat.h>
// This file contains functions that are applicable to all Unix-based platforms, including Linux, iOS, and OS X
@@ -53,11 +54,17 @@ int DFMkdirIfAbsent(const char *path, DFError **error)
return 1;
}
-int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFArray *array, DFError **error)
+int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFDirEntryList ***list, char **errmsg)
{
+ DFDirEntryList **listptr = *list;
+
DIR *dir = opendir(absPath);
if (dir == NULL) {
- DFErrorFormat(error,"%s: %s",relPath,strerror(errno));
+ if (errmsg != NULL) {
+ char temp[1024];
+ snprintf(temp,1024,"%s: %s",relPath,strerror(errno));
+ *errmsg = strdup(temp);
+ }
return 0;
}
@@ -71,18 +78,24 @@ int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DF
char *absSubPath = DFAppendPathComponent(absPath,result->d_name);
char *relSubPath = DFAppendPathComponent(relPath,result->d_name);
+ char *entryName;
if (relSubPath[0] == '/')
- DFArrayAppend(array,&relSubPath[1]);
+ entryName = &relSubPath[1];
else
- DFArrayAppend(array,relSubPath);
+ entryName = relSubPath;
+
+ *listptr = (DFDirEntryList *)calloc(1,sizeof(DFDirEntryList));
+ (*listptr)->name = strdup(entryName);
+ listptr = &(*listptr)->next;
if (recursive && DFIsDirectory(absSubPath))
- ok = DFAddDirContents(absSubPath,relSubPath,recursive,array,error);
+ ok = DFAddDirContents(absSubPath,relSubPath,recursive,&listptr,errmsg);
free(absSubPath);
free(relSubPath);
}
closedir(dir);
+ *list = listptr;
return ok;
}
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/614eabac/DocFormats/platform/src/Win32.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/src/Win32.c b/DocFormats/platform/src/Win32.c
index 6e680ff..9aeda88 100755
--- a/DocFormats/platform/src/Win32.c
+++ b/DocFormats/platform/src/Win32.c
@@ -47,6 +47,31 @@ void DFErrorSetWin32(DFError **error, DWORD code)
LocalFree(lpMsgBuf);
}
+void DFErrorMsgSetWin32(char **errmsg, DWORD code)
+{
+ if (errmsg == NULL)
+ return;
+
+ char *lpMsgBuf;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ code,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ (LPTSTR)&lpMsgBuf,
+ 0, NULL);
+ size_t len = strlen(lpMsgBuf);
+ while ((len > 0) &&
+ ((lpMsgBuf[len - 1] == '\n') ||
+ (lpMsgBuf[len - 1] == '\r') ||
+ (lpMsgBuf[len - 1] == '.')))
+ len--;
+ lpMsgBuf[len] = '\0';
+ *errmsg = strdup(lpMsgBuf);
+ LocalFree(lpMsgBuf);
+}
+
HANDLE onceMutex = NULL;
static int testAndSet(int *var,int value,HANDLE lock)
@@ -81,14 +106,15 @@ int DFMkdirIfAbsent(const char *path,DFError **error)
return 1;
}
-int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFArray *array, DFError **error)
+int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFDirEntryList ***list, char **errmsg)
{
+ DFDirEntryList **listptr = *list;
WIN32_FIND_DATA ffd;
HANDLE hFind = INVALID_HANDLE_VALUE;
char *pattern = DFFormatString("%s/*",absPath);
hFind = FindFirstFile(pattern,&ffd);
if (hFind == INVALID_HANDLE_VALUE) {
- DFErrorSetWin32(error,GetLastError());
+ DFErrorMsgSetWin32(errmsg,GetLastError());
free(pattern);
return 0;
}
@@ -101,13 +127,18 @@ int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DF
char *absSubPath = DFAppendPathComponent(absPath,ffd.cFileName);
char *relSubPath = DFAppendPathComponent(relPath,ffd.cFileName);
+ char *entryName;
if (relSubPath[0] == '/')
- DFArrayAppend(array,&relSubPath[1]);
+ entryName = &relSubPath[1];
else
- DFArrayAppend(array,relSubPath);
+ entryName = relSubPath;
+
+ *listptr = (DFDirEntryList *)calloc(1,sizeof(DFDirEntryList));
+ (*listptr)->name = strdup(entryName);
+ listptr = &(*listptr)->next;
if (recursive && (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
- ok = DFAddDirContents(absSubPath,relSubPath,recursive,array,error);
+ ok = DFAddDirContents(absSubPath,relSubPath,recursive,&listptr,errmsg);
free(absSubPath);
free(relSubPath);
@@ -115,6 +146,7 @@ int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DF
FindClose(hFind);
free(pattern);
+ *list = listptr;
return ok;
}
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/614eabac/consumers/dfutil/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/main.c b/consumers/dfutil/src/main.c
index 5348cc0..21b95a2 100644
--- a/consumers/dfutil/src/main.c
+++ b/consumers/dfutil/src/main.c
@@ -21,9 +21,11 @@
#include "StringTests.h"
#include "DFZipFile.h"
#include "DFCommon.h"
+#include "DFFilesystem.h"
#include <DocFormats/DocFormats.h>
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
static int runCommand(int argc, const char **argv, DFError **dferr)
{