Port to MonoDevelop
This commit is contained in:
20
MonoDevelop/FileSync.sln
Normal file
20
MonoDevelop/FileSync.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{2857B73E-F847-4B02-9238-064979017E93}") = "FileSync", "FileSync\FileSync.cproj", "{1926D52A-66BE-4D25-B6A3-1E691CDD8B18}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1926D52A-66BE-4D25-B6A3-1E691CDD8B18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1926D52A-66BE-4D25-B6A3-1E691CDD8B18}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1926D52A-66BE-4D25-B6A3-1E691CDD8B18}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1926D52A-66BE-4D25-B6A3-1E691CDD8B18}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = FileSync\FileSync.cproj
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
8
MonoDevelop/FileSync.userprefs
Normal file
8
MonoDevelop/FileSync.userprefs
Normal file
@@ -0,0 +1,8 @@
|
||||
<Properties>
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench />
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
</Properties>
|
||||
69
MonoDevelop/FileSync/FileSync.cproj
Normal file
69
MonoDevelop/FileSync/FileSync.cproj
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1926D52A-66BE-4D25-B6A3-1E691CDD8B18}</ProjectGuid>
|
||||
<Compiler>
|
||||
<Compiler ctype="GccCompiler" />
|
||||
</Compiler>
|
||||
<Language>C</Language>
|
||||
<Target>Bin</Target>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<OutputName>FileSync</OutputName>
|
||||
<CompileTarget>Bin</CompileTarget>
|
||||
<DefineSymbols>DEBUG MONODEVELOP</DefineSymbols>
|
||||
<SourceDirectory>.</SourceDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<OutputName>FileSync</OutputName>
|
||||
<CompileTarget>Bin</CompileTarget>
|
||||
<OptimizationLevel>3</OptimizationLevel>
|
||||
<DefineSymbols>MONODEVELOP</DefineSymbols>
|
||||
<SourceDirectory>.</SourceDirectory>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="src\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\src\crc.c">
|
||||
<Link>src\crc.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\filenode.c">
|
||||
<Link>src\filenode.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\filenodecmp.c">
|
||||
<Link>src\filenodecmp.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\fileutil.c">
|
||||
<Link>src\fileutil.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\main.c">
|
||||
<Link>src\main.c</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\src\util.c">
|
||||
<Link>src\util.c</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\src\crc.h">
|
||||
<Link>src\crc.h</Link>
|
||||
</None>
|
||||
<None Include="..\..\src\filenode.h">
|
||||
<Link>src\filenode.h</Link>
|
||||
</None>
|
||||
<None Include="..\..\src\filenodecmp.h">
|
||||
<Link>src\filenodecmp.h</Link>
|
||||
</None>
|
||||
<None Include="..\..\src\fileutil.h">
|
||||
<Link>src\fileutil.h</Link>
|
||||
</None>
|
||||
<None Include="..\..\src\util.h">
|
||||
<Link>src\util.h</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
BIN
MonoDevelop/FileSync/bin/Debug/FileSync
Normal file
BIN
MonoDevelop/FileSync/bin/Debug/FileSync
Normal file
Binary file not shown.
@@ -12,7 +12,9 @@
|
||||
# include <signal.h>
|
||||
# include <fcntl.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
# include <utime.h>
|
||||
# include <dirent.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
@@ -234,7 +236,7 @@ void File_GetSizeAndTime(char *fileName, long long *size, FileTime *time) {
|
||||
struct stat fs;
|
||||
lstat(fileName, &fs);
|
||||
*size = fs.st_size;
|
||||
*time = fs.st_mtime
|
||||
*time = fs.st_mtime;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -298,9 +300,10 @@ void File_IterateDir(char *path,
|
||||
entidad_dir = readdir(directorio);
|
||||
if (entidad_dir != NULL) {
|
||||
if (strcmp(entidad_dir->d_name, ".")
|
||||
&& strcmp(entidad_dir->d_name, "..")) {
|
||||
&& strcmp(entidad_dir->d_name, ".."))
|
||||
{
|
||||
// Each item
|
||||
snprintff(f_path, MaxPath, "%s/%s", path, entidad_dir->d_name);
|
||||
snprintf(f_path, MaxPath, "%s/%s", path, entidad_dir->d_name);
|
||||
fin = func(f_path, entidad_dir->d_name, data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user