--- trunk/reactos/subsys/system/expand/En.rc 2005-05-12 21:03:51 UTC (rev 15248)
+++ trunk/reactos/subsys/system/expand/En.rc 2005-05-12 21:10:10 UTC (rev 15249)
@@ -0,0 +1,16 @@
+#include "resource.h"
+/*
+ * Moved all hardcoded strings to En.rc.
+ * By Magnus Olsen 2005 magnus@itkonsult-olsen.com
+ */
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+STRINGTABLE DISCARDABLE
+{
+
+IDS_Copy, "ReactOS File Expansion Utility Version 1.0\n\
+Copyright Victor Schneider 1997\n\n\
+Usage: %s infile [outfile]\n"
+
+IDS_FAILS "LZCopy failed: return is %ld\n"
+}
--- trunk/reactos/subsys/system/expand/expand.c 2005-05-12 21:03:51 UTC (rev 15248)
+++ trunk/reactos/subsys/system/expand/expand.c 2005-05-12 21:10:10 UTC (rev 15249)
@@ -22,18 +22,21 @@
#include <string.h>
#include <windows.h>
#include <lzexpand.h>
+#include <tchar.h>
-int main(int argc, char *argv[])
+#include "resource.h"
+
+_tmain(int argc, TCHAR *argv[])
{
OFSTRUCT SourceOpenStruct1, SourceOpenStruct2;
LONG ret;
- HFILE hSourceFile, hDestFile;
+ HFILE hSourceFile, hDestFile;
+ TCHAR szMsg[RC_STRING_MAX_SIZE];
if (argc < 2)
{
- fprintf( stderr, "ReactOS File Expansion Utility Version 1.0\n", argv[0] );
- fprintf( stderr, "Copyright Victor Schneider 1997\n\n", argv[0] );
- fprintf( stderr, "Usage: %s infile [outfile]\n", argv[0] );
+ LoadString( GetModuleHandle(NULL), IDS_Copy, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
+ _ftprintf( stderr, szMsg, argv[0] );
return 1;
}
hSourceFile = LZOpenFile(argv[1], &SourceOpenStruct1, OF_READ);
@@ -41,13 +44,14 @@
hDestFile = LZOpenFile(argv[2], &SourceOpenStruct2, OF_CREATE | OF_WRITE);
else
{
- char OriginalName[MAX_PATH];
+ TCHAR OriginalName[MAX_PATH];
GetExpandedName(argv[1], OriginalName);
hDestFile = LZOpenFile(OriginalName, &SourceOpenStruct2, OF_CREATE | OF_WRITE);
}
ret = LZCopy(hSourceFile, hDestFile);
LZClose(hSourceFile);
LZClose(hDestFile);
- if (ret <= 0) fprintf(stderr,"LZCopy failed: return is %ld\n",ret);
+ LoadString( GetModuleHandle(NULL), IDS_FAILS, (LPTSTR) szMsg,RC_STRING_MAX_SIZE);
+ if (ret <= 0) _ftprintf(stderr,szMsg,ret);
return (ret <= 0);
}
--- trunk/reactos/subsys/system/expand/makefile 2005-05-12 21:03:51 UTC (rev 15248)
+++ trunk/reactos/subsys/system/expand/makefile 2005-05-12 21:10:10 UTC (rev 15249)
@@ -2,8 +2,6 @@
PATH_TO_TOP = ../../..
-TARGET_NORC = yes
-
TARGET_TYPE = program
TARGET_APPTYPE = console
@@ -12,7 +10,7 @@
TARGET_INSTALLDIR = system32
-TARGET_CFLAGS = -D__USE_W32API
+TARGET_CFLAGS = -D__USE_W32API
TARGET_SDKLIBS = lz32.a