gmime r1555 - in trunk: build/vs2008 src
- From: fejj svn gnome org
- To: svn-commits-list gnome org
- Subject: gmime r1555 - in trunk: build/vs2008 src
- Date: Sun, 5 Apr 2009 00:05:53 +0000 (UTC)
Author: fejj
Date: Sun Apr 5 00:05:53 2009
New Revision: 1555
URL: http://svn.gnome.org/viewvc/gmime?rev=1555&view=rev
Log:
added uuencode and uudecode projects
Modified:
trunk/build/vs2008/gmime.sln
trunk/src/getopt.c
trunk/src/uudecode.c
trunk/src/uuencode.c
Modified: trunk/build/vs2008/gmime.sln
==============================================================================
--- trunk/build/vs2008/gmime.sln (original)
+++ trunk/build/vs2008/gmime.sln Sun Apr 5 00:05:53 2009
@@ -43,6 +43,16 @@
{F281AAC0-61AB-4E5C-849D-34FDB3687675} = {F281AAC0-61AB-4E5C-849D-34FDB3687675}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uuencode", "uuencode.vcproj", "{9C2C07C2-AC9F-405E-87B4-8DAFA92708F9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F281AAC0-61AB-4E5C-849D-34FDB3687675} = {F281AAC0-61AB-4E5C-849D-34FDB3687675}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uudecode", "uudecode.vcproj", "{D076BFF6-F838-4D2B-9E61-D9C755140D62}"
+ ProjectSection(ProjectDependencies) = postProject
+ {F281AAC0-61AB-4E5C-849D-34FDB3687675} = {F281AAC0-61AB-4E5C-849D-34FDB3687675}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -77,6 +87,14 @@
{4222517E-7B56-44B7-A7BD-A1E07AF214B8}.Debug|Win32.ActiveCfg = Debug|Win32
{4222517E-7B56-44B7-A7BD-A1E07AF214B8}.Debug|Win32.Build.0 = Debug|Win32
{4222517E-7B56-44B7-A7BD-A1E07AF214B8}.Release|Win32.ActiveCfg = Release|Win32
+ {9C2C07C2-AC9F-405E-87B4-8DAFA92708F9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9C2C07C2-AC9F-405E-87B4-8DAFA92708F9}.Debug|Win32.Build.0 = Debug|Win32
+ {9C2C07C2-AC9F-405E-87B4-8DAFA92708F9}.Release|Win32.ActiveCfg = Release|Win32
+ {9C2C07C2-AC9F-405E-87B4-8DAFA92708F9}.Release|Win32.Build.0 = Release|Win32
+ {D076BFF6-F838-4D2B-9E61-D9C755140D62}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D076BFF6-F838-4D2B-9E61-D9C755140D62}.Debug|Win32.Build.0 = Debug|Win32
+ {D076BFF6-F838-4D2B-9E61-D9C755140D62}.Release|Win32.ActiveCfg = Release|Win32
+ {D076BFF6-F838-4D2B-9E61-D9C755140D62}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/src/getopt.c
==============================================================================
--- trunk/src/getopt.c (original)
+++ trunk/src/getopt.c Sun Apr 5 00:05:53 2009
@@ -43,6 +43,7 @@
#endif
#include <stdio.h>
+#include <string.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Modified: trunk/src/uudecode.c
==============================================================================
--- trunk/src/uudecode.c (original)
+++ trunk/src/uudecode.c Sun Apr 5 00:05:53 2009
@@ -22,14 +22,22 @@
#include <config.h>
#endif
+#include <gmime/gmime.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <fcntl.h>
#include <errno.h>
+#ifdef G_OS_WIN32
+#include <io.h>
+typedef int mode_t;
+#endif
#ifdef HAVE_GETOPT_H
#define _GNU_SOURCE
@@ -38,8 +46,6 @@
#include "getopt.h"
#endif
-#include <gmime/gmime.h>
-
#define DEFAULT_FILENAME "-"
@@ -132,7 +138,7 @@
do {
if ((fin = uufopen (infile, "r", O_RDONLY, 0)) == NULL) {
fprintf (stderr, "%s: %s: %s\n", progname,
- infile, strerror (errno));
+ infile, g_strerror (errno));
return -1;
}
@@ -198,7 +204,7 @@
if ((fd = open (outfile, O_CREAT | O_TRUNC | O_WRONLY, mode)) == -1) {
fprintf (stderr, "%s: %s: %s\n", progname,
- outfile, strerror (errno));
+ outfile, g_strerror (errno));
g_string_free (str, TRUE);
fclose (fin);
@@ -207,7 +213,7 @@
if (!(fout = fdopen (fd, "wb"))) {
fprintf (stderr, "%s: %s: %s\n", progname,
- outfile, strerror (errno));
+ outfile, g_strerror (errno));
g_string_free (str, TRUE);
fclose (fin);
close (fd);
@@ -235,7 +241,7 @@
n = decode ((const unsigned char *) inbuf, n, (unsigned char *) outbuf, &state, &save);
if (fwrite (outbuf, 1, n, fout) != n) {
fprintf (stderr, "%s: %s: %s\n", progname, outfile,
- strerror (ferror (fout)));
+ g_strerror (ferror (fout)));
fclose (fout);
fclose (fin);
return -1;
Modified: trunk/src/uuencode.c
==============================================================================
--- trunk/src/uuencode.c (original)
+++ trunk/src/uuencode.c Sun Apr 5 00:05:53 2009
@@ -52,14 +52,21 @@
#include <config.h>
#endif
+#include <gmime/gmime.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <fcntl.h>
#include <errno.h>
+#ifdef G_OS_WIN32
+#include <io.h>
+#endif
#ifdef HAVE_GETOPT_H
#define _GNU_SOURCE
@@ -68,8 +75,6 @@
#include "getopt.h"
#endif
-#include <gmime/gmime.h>
-
static struct option longopts[] = {
{ "help", no_argument, NULL, 'h' },
@@ -133,7 +138,7 @@
if ((fd = dup (1)) == -1) {
fprintf (stderr, "%s: cannot open stdout: %s\n",
- progname, strerror (errno));
+ progname, g_strerror (errno));
return -1;
}
@@ -149,7 +154,7 @@
if ((fd = filename ? open (filename, O_RDONLY) : dup (0)) == -1) {
fprintf (stderr, "%s: %s: %s\n", progname,
filename ? filename : "stdin",
- strerror (errno));
+ g_strerror (errno));
g_object_unref (ostream);
return -1;
}
@@ -157,14 +162,14 @@
if (fstat (fd, &st) == -1) {
fprintf (stderr, "%s: %s: %s\n", progname,
filename ? filename : "stdin",
- strerror (errno));
+ g_strerror (errno));
g_object_unref (ostream);
return -1;
}
if (g_mime_stream_printf (ostream, "begin%s %.3o %s\n",
base64 ? "-base64" : "", st.st_mode & 0777, name) == -1) {
- fprintf (stderr, "%s: %s\n", progname, strerror (errno));
+ fprintf (stderr, "%s: %s\n", progname, g_strerror (errno));
g_object_unref (ostream);
return -1;
}
@@ -178,7 +183,7 @@
g_object_unref (filter);
if (g_mime_stream_write_to_stream (istream, fstream) == -1) {
- fprintf (stderr, "%s: %s\n", progname, strerror (errno));
+ fprintf (stderr, "%s: %s\n", progname, g_strerror (errno));
g_object_unref (fstream);
g_object_unref (istream);
g_object_unref (ostream);
@@ -190,7 +195,7 @@
g_object_unref (istream);
if (g_mime_stream_write_string (ostream, base64 ? "====\n" : "end\n") == -1) {
- fprintf (stderr, "%s: %s\n", progname, strerror (errno));
+ fprintf (stderr, "%s: %s\n", progname, g_strerror (errno));
g_object_unref (ostream);
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]