Delete all Trailing spaces in code.
authorDaniel Reimer <reimer.daniel@freenet.de>
Fri, 19 Oct 2007 23:05:02 +0000 (23:05 +0000)
committerDaniel Reimer <reimer.daniel@freenet.de>
Fri, 19 Oct 2007 23:05:02 +0000 (23:05 +0000)
svn path=/trunk/; revision=29689

293 files changed:
rosapps/demos/ddraw/main.cpp
rosapps/demos/maze/maze.rc
rosapps/demos/mazescr/maze.rc
rosapps/devutils/cputointel/ConvertToIA32Process.c
rosapps/devutils/cputointel/ConvertToPPCProcess.c
rosapps/devutils/cputointel/ConvertingProcess.c
rosapps/devutils/cputointel/CpuToIntel.c
rosapps/devutils/cputointel/From/ARM/ARM.h
rosapps/devutils/cputointel/From/ARM/ARMBrain.c
rosapps/devutils/cputointel/From/ARM/ARMBrain.h
rosapps/devutils/cputointel/From/ARM/ARMopcode.c
rosapps/devutils/cputointel/From/IA32/IA32.h
rosapps/devutils/cputointel/From/IA32/IA32Brain.c
rosapps/devutils/cputointel/From/IA32/IA32Brain.h
rosapps/devutils/cputointel/From/IA32/IA32opcode.c
rosapps/devutils/cputointel/From/PPC/PPC.h
rosapps/devutils/cputointel/From/PPC/PPCBrain.c
rosapps/devutils/cputointel/From/PPC/PPCBrain.h
rosapps/devutils/cputointel/From/PPC/PPCopcode.c
rosapps/devutils/cputointel/From/dummycpu/Dummy.h
rosapps/devutils/cputointel/From/dummycpu/DummyBrain.c
rosapps/devutils/cputointel/From/dummycpu/DummyBrain.h
rosapps/devutils/cputointel/From/dummycpu/Dummyopcode.c
rosapps/devutils/cputointel/From/m68k/M68kBrain.c
rosapps/devutils/cputointel/From/m68k/M68kBrain.h
rosapps/devutils/cputointel/From/m68k/M68kopcode.c
rosapps/devutils/cputointel/ImageLoader.c
rosapps/devutils/cputointel/any_op.h
rosapps/devutils/cputointel/cputointel.rbuild
rosapps/devutils/cputointel/misc.c
rosapps/devutils/gdb2/gdb2.cpp
rosapps/devutils/gdihv/handlelist.c
rosapps/devutils/genguid/genguid.rc
rosapps/devutils/roswebparser/Windows28591.h
rosapps/devutils/roswebparser/Windows28592.h
rosapps/devutils/roswebparser/oem437.h
rosapps/devutils/roswebparser/oem850.h
rosapps/devutils/roswebparser/roswebparser.c
rosapps/devutils/roswebparser/roswebparser.rbuild
rosapps/devutils/roswebparser/utf8.c
rosapps/devutils/zoomin/zoomin.rc
rosapps/dflat32/dflat32.rbuild
rosapps/dflat32/edit.rc
rosapps/directory.rbuild
rosapps/downloader/download.c
rosapps/downloader/lang/de-DE.rc
rosapps/downloader/lang/en-US.rc
rosapps/downloader/lang/es-ES.rc
rosapps/downloader/lang/fr-FR.rc
rosapps/downloader/lang/id-ID.rc
rosapps/downloader/lang/it-IT.rc
rosapps/downloader/lang/ru-RU.rc
rosapps/downloader/lang/uk-UA.rc
rosapps/downloader/main.c
rosapps/downloader/xml.c
rosapps/fontview/display.c
rosapps/fontview/fontview.c
rosapps/fraginator/DefragDialog.cpp
rosapps/fraginator/Defragment.cpp
rosapps/fraginator/DriveVolume.cpp
rosapps/fraginator/DriveVolume.h
rosapps/fraginator/Fraginator.rc
rosapps/fraginator/MainDialog.cpp
rosapps/fraginator/ReportDialog.cpp
rosapps/fraginator/Unfrag.cpp
rosapps/fraginator/resource.h
rosapps/gettype/gettype.c
rosapps/green/screen.c
rosapps/imagesoft/adjust.c
rosapps/lib/dflat32/dflat32.def
rosapps/lib/dflat32/dflat32.rc
rosapps/lib/libjpeg/example.c
rosapps/lib/libjpeg/jcapimin.c
rosapps/lib/libjpeg/jchuff.c
rosapps/lib/libjpeg/jcmarker.c
rosapps/lib/libjpeg/jcmaster.c
rosapps/lib/libjpeg/jcparam.c
rosapps/lib/libjpeg/jcphuff.c
rosapps/lib/libjpeg/jdapimin.c
rosapps/lib/libjpeg/jdct.h
rosapps/lib/libjpeg/jddctmgr.c
rosapps/lib/libjpeg/jdhuff.c
rosapps/lib/libjpeg/jdinput.c
rosapps/lib/libjpeg/jdmarker.c
rosapps/lib/libjpeg/jdmaster.c
rosapps/lib/libjpeg/jdmerge.c
rosapps/lib/libjpeg/jdphuff.c
rosapps/lib/libjpeg/jdsample.c
rosapps/lib/libjpeg/jfdctflt.c
rosapps/lib/libjpeg/jfdctfst.c
rosapps/lib/libjpeg/jfdctint.c
rosapps/lib/libjpeg/jidctflt.c
rosapps/lib/libjpeg/jidctfst.c
rosapps/lib/libjpeg/jidctint.c
rosapps/lib/libjpeg/jidctred.c
rosapps/lib/libjpeg/jmemdos.c
rosapps/lib/libjpeg/jmemmgr.c
rosapps/lib/libjpeg/jmorecfg.h
rosapps/lib/libjpeg/jpeglib.h
rosapps/lib/libjpeg/jpegtran.c
rosapps/lib/libjpeg/jquant1.c
rosapps/lib/libjpeg/jquant2.c
rosapps/lib/libjpeg/rdcolmap.c
rosapps/lib/libjpeg/rdrle.c
rosapps/lib/libjpeg/rdswitch.c
rosapps/lib/libjpeg/rdtarga.c
rosapps/lib/libjpeg/transupp.c
rosapps/lib/libjpeg/wrbmp.c
rosapps/lib/libjpeg/wrrle.c
rosapps/logevent/logevent.c
rosapps/magnify/lang/de-DE.rc
rosapps/magnify/lang/en-US.rc
rosapps/magnify/lang/es-ES.rc
rosapps/magnify/lang/fr-FR.rc
rosapps/magnify/lang/uk-UA.rc
rosapps/magnify/magnifier.c
rosapps/mc/slang/slvideo.c
rosapps/net/ncftp/libncftp/util2.cpp
rosapps/net/ncftp/ncftp.rbuild
rosapps/net/ncftp/ncftp.rc
rosapps/net/netreg/netreg.cpp
rosapps/net/netreg/netreg.rbuild
rosapps/notevil/notevil.rc
rosapps/old_wordpad/lang/pl-PL.rc
rosapps/packmgr/cmd-line/main.c
rosapps/packmgr/gui/de.rc
rosapps/packmgr/gui/en.rc
rosapps/packmgr/gui/es.rc
rosapps/packmgr/gui/fr.rc
rosapps/packmgr/gui/generic.rc
rosapps/packmgr/gui/main.c
rosapps/packmgr/gui/main.h
rosapps/packmgr/gui/resource.h
rosapps/packmgr/gui/ru.rc
rosapps/packmgr/lib/de.rc
rosapps/packmgr/lib/download.cpp
rosapps/packmgr/lib/en.rc
rosapps/packmgr/lib/es.rc
rosapps/packmgr/lib/expat.h
rosapps/packmgr/lib/fr.rc
rosapps/packmgr/lib/functions.cpp
rosapps/packmgr/lib/log.cpp
rosapps/packmgr/lib/log.h
rosapps/packmgr/lib/main.cpp
rosapps/packmgr/lib/options.cpp
rosapps/packmgr/lib/package.cpp
rosapps/packmgr/lib/package.h
rosapps/packmgr/lib/ru.rc
rosapps/packmgr/lib/script.cpp
rosapps/packmgr/lib/script.h
rosapps/packmgr/lib/tree.cpp
rosapps/roshttpd/common/socket.cpp
rosapps/roshttpd/http.cpp
rosapps/roshttpd/httpd.cpp
rosapps/screenshot/screenshot.rbuild
rosapps/smartpdf/baseutils/file_util.c
rosapps/smartpdf/baseutils/log_util.c
rosapps/smartpdf/baseutils/netstr.c
rosapps/smartpdf/baseutils/prefs_util.c
rosapps/smartpdf/baseutils/str_util.c
rosapps/smartpdf/baseutils/win_dib.cpp
rosapps/smartpdf/baseutils/win_dib.h
rosapps/smartpdf/baseutils/win_image.cpp
rosapps/smartpdf/baseutils/win_util.c
rosapps/smartpdf/fitz/apps/macosx/macpdf.c
rosapps/smartpdf/fitz/apps/mozilla/npapi.h
rosapps/smartpdf/fitz/apps/mozilla/npunix.c
rosapps/smartpdf/fitz/apps/mozilla/npupp.h
rosapps/smartpdf/fitz/apps/mozilla/npwin.c
rosapps/smartpdf/fitz/apps/samshow.c
rosapps/smartpdf/fitz/apps/windows/winmain.c
rosapps/smartpdf/fitz/apps/windows/winres.rc
rosapps/smartpdf/fitz/base/base_cpudep.c
rosapps/smartpdf/fitz/base/base_hash.c
rosapps/smartpdf/fitz/base/base_memory.c
rosapps/smartpdf/fitz/include/fitz-base.h
rosapps/smartpdf/fitz/include/fitz-draw.h
rosapps/smartpdf/fitz/include/fitz-stream.h
rosapps/smartpdf/fitz/include/fitz-world.h
rosapps/smartpdf/fitz/include/pdfapp.h
rosapps/smartpdf/fitz/mupdf/pdf_doctor.c
rosapps/smartpdf/fitz/mupdf/pdf_fontfilefc.c
rosapps/smartpdf/fitz/mupdf/pdf_fontfilems.c
rosapps/smartpdf/fitz/mupdf/pdf_function.c
rosapps/smartpdf/fitz/mupdf/pdf_image.c
rosapps/smartpdf/fitz/mupdf/pdf_interpret.c
rosapps/smartpdf/fitz/mupdf/pdf_open.c
rosapps/smartpdf/fitz/mupdf/pdf_page.c
rosapps/smartpdf/fitz/mupdf/pdf_parse.c
rosapps/smartpdf/fitz/mupdf/pdf_resources.c
rosapps/smartpdf/fitz/mupdf/pdf_shade1.c
rosapps/smartpdf/fitz/mupdf/pdf_shade4.c
rosapps/smartpdf/fitz/mupdf/pdf_store.c
rosapps/smartpdf/fitz/mupdf/pdf_stream.c
rosapps/smartpdf/fitz/mupdf/pdf_unicode.c
rosapps/smartpdf/fitz/raster/glyphcache.c
rosapps/smartpdf/fitz/raster/imagescale.c
rosapps/smartpdf/fitz/raster/pathstroke.c
rosapps/smartpdf/fitz/samus/sa_tiff.c
rosapps/smartpdf/fitz/samus/sa_zip.c
rosapps/smartpdf/fitz/stream/filt_a85e.c
rosapps/smartpdf/fitz/stream/filt_faxc.h
rosapps/smartpdf/fitz/stream/filt_faxd.c
rosapps/smartpdf/fitz/stream/filt_faxe.c
rosapps/smartpdf/fitz/stream/filt_flate.c
rosapps/smartpdf/fitz/stream/filt_lzwe.c
rosapps/smartpdf/fitz/stream/filt_rle.c
rosapps/smartpdf/fitz/stream/obj_array.c
rosapps/smartpdf/fitz/stream/obj_dict.c
rosapps/smartpdf/fitz/stream/obj_parse.c
rosapps/smartpdf/fitz/stream/stm_misc.c
rosapps/smartpdf/fitz/world/res_colorspace.c
rosapps/smartpdf/poppler/goo/FastFixedAllocator.h
rosapps/smartpdf/poppler/goo/GooString.h
rosapps/smartpdf/poppler/goo/GooVector.h
rosapps/smartpdf/poppler/poppler/ArthurOutputDev.h
rosapps/smartpdf/poppler/poppler/CairoOutputDev.h
rosapps/smartpdf/poppler/poppler/Catalog.h
rosapps/smartpdf/poppler/poppler/FlateStream.h
rosapps/smartpdf/poppler/poppler/FontInfo.h
rosapps/smartpdf/poppler/poppler/GfxFont.h
rosapps/smartpdf/poppler/poppler/GfxState.h
rosapps/smartpdf/poppler/poppler/GlobalParams.h
rosapps/smartpdf/poppler/poppler/Lexer.h
rosapps/smartpdf/poppler/poppler/Link.h
rosapps/smartpdf/poppler/poppler/Object.h
rosapps/smartpdf/poppler/poppler/OutputDev.h
rosapps/smartpdf/poppler/poppler/Page.h
rosapps/smartpdf/poppler/poppler/SplashOutputDev.h
rosapps/smartpdf/poppler/poppler/Stream.h
rosapps/smartpdf/poppler/poppler/UGooString.h
rosapps/smartpdf/poppler/poppler/UnicodeCClassTables.h
rosapps/smartpdf/poppler/poppler/UnicodeCompTables.h
rosapps/smartpdf/poppler/poppler/UnicodeDecompTables.h
rosapps/smartpdf/poppler/poppler/UnicodeTypeTable.h
rosapps/smartpdf/poppler/poppler/XRef.h
rosapps/smartpdf/poppler/splash/SplashErrorCodes.h
rosapps/smartpdf/poppler/splash/SplashXPathScanner.h
rosapps/smartpdf/poppler/utils/HtmlFonts.h
rosapps/smartpdf/poppler/utils/HtmlLinks.h
rosapps/smartpdf/poppler/utils/HtmlOutputDev.h
rosapps/smartpdf/src/DisplayModel.h
rosapps/smartpdf/src/PdfEngine.h
rosapps/smartpdf/src/Resource.h
rosapps/smartpdf/src/SumatraPDF.cpp
rosapps/smartpdf/src/SumatraPDF.h
rosapps/smartpdf/src/SumatraPDF.rc
rosapps/smartpdf/src/translations.cpp
rosapps/sysutils/ctm/De.rc
rosapps/sysutils/ctm/En.rc
rosapps/sysutils/ctm/Fr.rc
rosapps/sysutils/ctm/Gr.rc
rosapps/sysutils/ctm/Ru.rc
rosapps/sysutils/ctm/Uk.rc
rosapps/sysutils/dosfsck/boot.c
rosapps/sysutils/dosfsck/byteorder.h
rosapps/sysutils/dosfsck/check.c
rosapps/sysutils/dosfsck/dosfsck.c
rosapps/sysutils/dosfsck/dosfsck.h
rosapps/sysutils/dosfsck/io.c
rosapps/sysutils/dosfsck/lfn.c
rosapps/sysutils/mkdosfs/mkdosfs.c
rosapps/sysutils/regexpl/Completion.cpp
rosapps/sysutils/regexpl/Console.cpp
rosapps/sysutils/regexpl/Pattern.cpp
rosapps/sysutils/regexpl/RegistryExplorer.cpp
rosapps/sysutils/regexpl/RegistryKey.cpp
rosapps/sysutils/regexpl/RegistryTree.cpp
rosapps/sysutils/regexpl/ShellCommandChangeKey.cpp
rosapps/sysutils/regexpl/ShellCommandConnect.cpp
rosapps/sysutils/regexpl/ShellCommandDACL.cpp
rosapps/sysutils/regexpl/ShellCommandDeleteKey.cpp
rosapps/sysutils/regexpl/ShellCommandDeleteValue.cpp
rosapps/sysutils/regexpl/ShellCommandDir.cpp
rosapps/sysutils/regexpl/ShellCommandNewKey.cpp
rosapps/sysutils/regexpl/ShellCommandOwner.cpp
rosapps/sysutils/regexpl/ShellCommandSACL.cpp
rosapps/sysutils/regexpl/ShellCommandSetValue.cpp
rosapps/sysutils/regexpl/ShellCommandValue.cpp
rosapps/sysutils/regexpl/ShellCommandsLinkedList.cpp
rosapps/sysutils/systeminfo/lang/en-US.rc
rosapps/sysutils/systeminfo/lang/fr-FR.rc
rosapps/sysutils/systeminfo/systeminfo.c
rosapps/sysutils/tlist/tlist.rc
rosapps/sysutils/utils/binpatch/patch.c
rosapps/sysutils/utils/pice/loader/stab.def
rosapps/sysutils/utils/pice/module/stab.def
rosapps/sysutils/utils/ps/ps.c
rosapps/sysutils/utils/sdkparse/sdkparse.cpp
rosapps/sysutils/utils/theme/dump/themedump.cpp
rosapps/templates/dialog/dialog.rc
rosapps/templates/mdi/mdi.rc
rosapps/winver/winver.rbuild

index b393aa7..489da70 100644 (file)
@@ -15,12 +15,12 @@ bool Fullscreen, Running;
 
 bool Init (HWND hwnd)
 {
-       DDSURFACEDESC2 ddsd; 
+       DDSURFACEDESC2 ddsd;
        HRESULT hResult;
 
        // Create the main object
        OutputDebugString("=> DirectDrawCreateEx\n");
-       hResult = DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL); 
+       hResult = DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL);
 
        if (hResult != DD_OK)
        {
@@ -37,7 +37,7 @@ bool Init (HWND hwnd)
                hResult = DirectDraw->SetCooperativeLevel (hwnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
        else
                hResult = DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL);
-               
+
        if (hResult != DD_OK)
        {
                MessageBox(0,DDErrorString(hResult), "DDraw->SetCooperativeLevel", 0);
@@ -49,7 +49,7 @@ bool Init (HWND hwnd)
        {
                OutputDebugString("=> DDraw->SetDisplayMode\n");
                hResult = DirectDraw->SetDisplayMode (800, 600, 32, 0, 0);
-                       
+
                if (hResult != DD_OK)
                {
                        MessageBox(0,DDErrorString(hResult), "DDraw->SetDisplayMode", 0);
@@ -90,7 +90,7 @@ bool Init (HWND hwnd)
     {
                MessageBox(0,DDErrorString(hResult), "Clipper->SetHWnd", 0);
         return  0;
-    }    
+    }
 
        OutputDebugString("=> Suface->SetClipper\n");
     hResult = FrontBuffer->SetClipper(Clipper);
@@ -112,12 +112,12 @@ void Draw (HWND hwnd)
 
        DDBLTFX  ddbltfx;
        ddbltfx.dwSize = sizeof(DDBLTFX);
-       ddbltfx.dwFillColor = RGB(255, 0, 255); 
+       ddbltfx.dwFillColor = RGB(255, 0, 255);
 
        OutputDebugString("=> Surface->Blt (DDBLT_COLORFILL)\n");
-       
+
        FrontBuffer->Blt(&rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &ddbltfx);
-}              
+}
 
 void CleanUp (void)
 {
@@ -142,47 +142,47 @@ void CleanUp (void)
        }
 }
 
-int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, 
+int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
                                        LPSTR lpCmdLine, int nCmdShow)
 {
-       MSG msg;  
-       WNDCLASS wndclass; 
+       MSG msg;
+       WNDCLASS wndclass;
        HWND hwnd;
        Fullscreen = MessageBox(0, "Do you want to me to run in Fullscreen ?", 0, MB_YESNO) == IDYES;
 
        // Create windnow
-       wndclass.style         = CS_HREDRAW | CS_VREDRAW; 
+       wndclass.style         = CS_HREDRAW | CS_VREDRAW;
        wndclass.lpfnWndProc   = WndProc;
        wndclass.cbClsExtra    = 0;
        wndclass.cbWndExtra    = 0;
        wndclass.hInstance     = hInst;
        wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION);
-       wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW); 
+       wndclass.hCursor       = LoadCursor (NULL, IDC_ARROW);
        wndclass.hbrBackground = (HBRUSH)GetStockObject (LTGRAY_BRUSH);
        wndclass.lpszMenuName  = NULL;
-       wndclass.lpszClassName = "DDrawDemo"; 
+       wndclass.lpszClassName = "DDrawDemo";
 
-       RegisterClass(&wndclass);    
+       RegisterClass(&wndclass);
 
 #ifdef USE_CLIPPER
-       hwnd = CreateWindow("DDrawDemo", 
-                         "ReactOS DirectDraw Demo", 
+       hwnd = CreateWindow("DDrawDemo",
+                         "ReactOS DirectDraw Demo",
                                                 Fullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW,
-                                                CW_USEDEFAULT, 
                                                 CW_USEDEFAULT,
-                                                800, 
-                                                600,     
-                                                NULL, NULL, 
+                                                CW_USEDEFAULT,
+                                                800,
+                                                600,
+                                                NULL, NULL,
                                                 hInst, NULL);
 #else
-       hwnd = CreateWindow("DDrawDemo", 
-                         "ReactOS DirectDraw Demo", 
+       hwnd = CreateWindow("DDrawDemo",
+                         "ReactOS DirectDraw Demo",
                          WS_POPUP,
-                                                CW_USEDEFAULT, 
                                                 CW_USEDEFAULT,
-                                                800, 
-                                                600,     
-                                                NULL, NULL, 
+                                                CW_USEDEFAULT,
+                                                800,
+                                                600,
+                                                NULL, NULL,
                                                 hInst, NULL);
 #endif
 
@@ -191,10 +191,10 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
        {
                Running = true;
 
-               ShowWindow(hwnd, nCmdShow);  
+               ShowWindow(hwnd, nCmdShow);
                UpdateWindow(hwnd);
        }
-    
+
        // Main loop
        while (Running)
        {
@@ -202,12 +202,12 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
                        Draw(hwnd);
 
                if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
-               { 
+               {
                        if (msg.message == WM_QUIT) break;
                        TranslateMessage(&msg);
                        DispatchMessage(&msg);
                }
-       } 
+       }
 
        CleanUp();
 
@@ -215,9 +215,9 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
 }
 
 
-LONG WINAPI WndProc (HWND hwnd, UINT message, 
-                         UINT wParam, LONG lParam) 
-{ 
+LONG WINAPI WndProc (HWND hwnd, UINT message,
+                         UINT wParam, LONG lParam)
+{
        switch (message)
        {
                case WM_PAINT:
@@ -238,13 +238,13 @@ LONG WINAPI WndProc (HWND hwnd, UINT message,
 
                case WM_DESTROY:
                {
-                       PostQuitMessage (0); 
+                       PostQuitMessage (0);
                        return 0;
                } break;
        }
 
        return DefWindowProc (hwnd, message, wParam, lParam);
-} 
+}
 
 PCHAR DDErrorString (HRESULT hResult)
 {
index 67cab63..9ed364e 100644 (file)
@@ -17,7 +17,7 @@
 // String Table
 //
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     idsAppName              "Screen Saver.Maze"
 END
@@ -28,17 +28,17 @@ END
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE DISCARDABLE
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE DISCARDABLE
 BEGIN
     "#include <scrnsave.h>\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE DISCARDABLE
 BEGIN
     "\r\n"
     "\0"
index 67cab63..9ed364e 100644 (file)
@@ -17,7 +17,7 @@
 // String Table
 //
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     idsAppName              "Screen Saver.Maze"
 END
@@ -28,17 +28,17 @@ END
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE DISCARDABLE
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE DISCARDABLE
 BEGIN
     "#include <scrnsave.h>\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE DISCARDABLE
 BEGIN
     "\r\n"
     "\0"
index c0df5e5..0398ab8 100644 (file)
@@ -80,7 +80,7 @@ static void standardreg(CPU_INT *RegTableCount, CPU_INT reg, CPU_INT setup_ebp,
 }
 
 CPU_INT ConvertToIA32Process( FILE *outfp,
-                               PMYBrainAnalys pMystart, 
+                               PMYBrainAnalys pMystart,
                                PMYBrainAnalys pMyend, CPU_INT regbits,
                                CPU_INT HowManyRegInUse,
                                CPU_INT *RegTableCount)
@@ -202,7 +202,7 @@ CPU_INT ConvertToIA32Process( FILE *outfp,
                 if ((pMystart->type & 2)== 2)
                 {
                     /* dest [eax - 0x20], source reg */
-                    
+
                     fprintf(outfp,"mov dword [");
                     standardreg( RegTableCount,
                                  pMystart->dst,
@@ -255,7 +255,7 @@ CPU_INT ConvertToIA32Process( FILE *outfp,
             pMystart=NULL;
         else
             pMystart = (PMYBrainAnalys) pMystart->ptr_next;
-        
+
     }
     return 0;
 }
index d8b3ad0..4cb363f 100644 (file)
@@ -28,8 +28,8 @@ static void standardreg(CPU_INT *RegTableCount, CPU_UNINT reg,
     }
 }
 
-CPU_INT ConvertToPPCProcess( FILE *outfp, 
-                               PMYBrainAnalys pMystart, 
+CPU_INT ConvertToPPCProcess( FILE *outfp,
+                               PMYBrainAnalys pMystart,
                                PMYBrainAnalys pMyend, CPU_INT regbits,
                                CPU_INT HowManyRegInUse,
                                CPU_INT *RegTableCount)
@@ -71,7 +71,7 @@ CPU_INT ConvertToPPCProcess( FILE *outfp,
     }
 
 
-/*  fixme gas compatible 
+/*  fixme gas compatible
     fprintf(outfp,"BITS 32\n");
     fprintf(outfp,"GLOBAL _main\n");
     fprintf(outfp,"SECTION .text\n\n");
@@ -130,7 +130,7 @@ CPU_INT ConvertToPPCProcess( FILE *outfp,
                     }
                 }
             } /* end pMyBrainAnalys->type & 8 */
-            
+
             if ((pMystart->type & 64)== 64)
             {
                 if ((pMystart->type & 2)== 2)
@@ -149,7 +149,7 @@ CPU_INT ConvertToPPCProcess( FILE *outfp,
                                  pMystart->src,
                                  setup_ebp, outfp);
                     fprintf(outfp,", %d(",pMystart->dst_extra);
-                    
+
                     standardreg( RegTableCount,
                                  pMystart->dst,
                                  setup_ebp, outfp);
@@ -165,7 +165,7 @@ CPU_INT ConvertToPPCProcess( FILE *outfp,
             {
                if (setup_ebp == 1)
                {
-                    // FIXME end our own frame pointer 
+                    // FIXME end our own frame pointer
                     fprintf(outfp,"\n; clean up after the frame \n");
                }
             }
index a775b7c..e8cc079 100644 (file)
@@ -68,7 +68,7 @@ CPU_INT ConvertProcess(FILE *outfp, CPU_INT FromCpuid, CPU_INT ToCpuid)
     switch (ToCpuid)
     {
         case IMAGE_FILE_MACHINE_I386:
-             ret = ConvertToIA32Process( outfp, pMystart, 
+             ret = ConvertToIA32Process( outfp, pMystart,
                                          pMyend, regbits,
                                          HowManyRegInUse,
                                          RegTableCount);
@@ -80,7 +80,7 @@ CPU_INT ConvertProcess(FILE *outfp, CPU_INT FromCpuid, CPU_INT ToCpuid)
              break;
 
         case IMAGE_FILE_MACHINE_POWERPC:
-             ret = ConvertToPPCProcess( outfp, pMystart, 
+             ret = ConvertToPPCProcess( outfp, pMystart,
                                         pMyend, regbits,
                                         HowManyRegInUse,
                                         RegTableCount);
index 7d6c295..df8499f 100644 (file)
@@ -95,14 +95,14 @@ int main(int argc, char * argv[])
     //}
 
     //                                                    mode 0 disambler
-    //                                                    mode 1 convert to intel 
+    //                                                    mode 1 convert to intel
     //                                                    mode 2 convert to ppc
     //return LoadPFileImage(infile,outfile,BaseAddress,cpuid,type, mode);
-   //LoadPFileImage("e:\\testppc.exe","e:\\cputointel.asm",0,0,0,1); 
-    LoadPFileImage("e:\\testppc.exe","e:\\cputointel.asm",0,0,0,1); 
+   //LoadPFileImage("e:\\testppc.exe","e:\\cputointel.asm",0,0,0,1);
+    LoadPFileImage("e:\\testppc.exe","e:\\cputointel.asm",0,0,0,1);
    //pMyBrainAnalys = NULL;
    //pStartMyBrainAnalys = NULL;
-   //LoadPFileImage("e:\\testppc.exe","e:\\cputoppc.asm",0,0,0,2); 
+   //LoadPFileImage("e:\\testppc.exe","e:\\cputoppc.asm",0,0,0,2);
 
    // return LoadPFileImage("e:\\testms.exe","e:\\cputointel.asm",0,0,0,1); // convert
   return 0;
index 9ed48f2..222cb0f 100644 (file)
@@ -12,6 +12,6 @@ CPU_INT ARMBrain(    CPU_BYTE *cpu_buffer,
 CPU_INT ARM_(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
 
 
-/* Export comment thing see m68k for example 
+/* Export comment thing see m68k for example
  * in dummy we do not show it, for it is diffent for each cpu
  */
index 2df7405..3220463 100644 (file)
@@ -1,20 +1,20 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "ARMBrain.h"
 #include "ARM.h"
 #include "../../misc.h"
 
-/* 
- * DummyBrain is example how you create you own cpu brain to translate from 
+/*
+ * DummyBrain is example how you create you own cpu brain to translate from
  * cpu to intel assembler, I have not add DummyBrain to the loader it is not
  * need it in our example. When you write you own brain, it must be setup in
  * misc.c function LoadPFileImage and PEFileStart, PEFileStart maybe does not
  * need the brain you have writen so you do not need setup it there then.
  *
- * input param: 
+ * input param:
  *         cpu_buffer   : the memory buffer with loaded program we whant translate
- *         cpu_pos      : the positions in the cpu_buffer 
+ *         cpu_pos      : the positions in the cpu_buffer
  *         cpu_size     : the alloced memory size of the cpu_buffer
  *         BaseAddress  : the virtual memory address we setup to use.
  *         cpuarch      : the sub arch for the brain, example if it exists more one
  *           mode       : if we should run disambler of this binary or
  *                        translate it, Disambler will not calc the
  *                        the row name right so we simple give each
-                          row a name. In translations mode we run a 
- *                        analys so we getting better optimzing and 
+                          row a name. In translations mode we run a
+ *                        analys so we getting better optimzing and
  *                        only row name there we need.
  *                        value for mode are :
  *                                             0 = disambler mode
  *                                             1 = translate mode intel
  *
  * return value
- *         0            : Ok 
- *         1            : unimplemt 
+ *         0            : Ok
+ *         1            : unimplemt
  *         2            : Unkonwn Opcode
  *         3            : unimplement cpu
  *         4            : unknown machine
@@ -52,13 +52,13 @@ CPU_INT ARMBrain(  CPU_BYTE *cpu_buffer,
     CPU_INT retsize;
 
 
-    /* now we start the process */    
+    /* now we start the process */
     while (cpu_pos<cpu_size)
     {
         cpu_oldpos = cpu_pos;
 
         cpuint = cpu_buffer[cpu_pos];
-    
+
         /* Add */
         if ((cpuint - (cpuint & GetMaskByte32(cpuARMInit_))) == ConvertBitToByte32(cpuARMInit_))
         {
@@ -69,7 +69,7 @@ CPU_INT ARMBrain(  CPU_BYTE *cpu_buffer,
             else
                  cpu_pos += retsize;
         }
-    
+
         /* Found all Opcode and breakout and return no error found */
         if (cpu_pos >=cpu_size)
         {
@@ -78,11 +78,11 @@ CPU_INT ARMBrain(  CPU_BYTE *cpu_buffer,
 
         /* Check if we have found a cpu opcode */
         if (cpu_oldpos == cpu_pos)
-        {            
+        {
             if (retcode == 0)
-            {              
+            {
                 /* no unimplement error where found so we return a msg for unknown opcode */
-                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);                
+                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);
                 retcode = 2;
             }
         }
@@ -94,5 +94,5 @@ CPU_INT ARMBrain(  CPU_BYTE *cpu_buffer,
             break;
         }
     }
-    return retcode;    
+    return retcode;
 }
index 93ef2b8..0b589fb 100644 (file)
@@ -2,10 +2,10 @@
 #include "../../misc.h"
 
 
-/* example how setup a opcode, this opcode is 16bit long (taken from M68K) 
- * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent 
- * thing in the opcode, example which reg so on, it can be etither 0 or 1 in 
- * the opcode. but a opcode have also normal bit that is always been set to 
+/* example how setup a opcode, this opcode is 16bit long (taken from M68K)
+ * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent
+ * thing in the opcode, example which reg so on, it can be etither 0 or 1 in
+ * the opcode. but a opcode have also normal bit that is always been set to
  * same. thuse bit are always 0 or 1
  */
 CPU_BYTE cpuARMInit_[32] = {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2};
index 8edfc2c..bf21808 100644 (file)
@@ -1,45 +1,45 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "../../misc.h"
 
 
 /* cpuDummyInit_Add
- * Input param : 
- *               out         : The file pointer that we write to (the output file to intel asm) 
+ * Input param :
+ *               out         : The file pointer that we write to (the output file to intel asm)
  *               cpu_buffer  : The memory buffer we have our binary code that we whant convert
- *               cpu_pos     : Current positions in the cpu_buffer 
+ *               cpu_pos     : Current positions in the cpu_buffer
  *               cpu_size    : The memory size of the cpu_buffer
- *               BaseAddress : The base address you whant the binay file should run from 
+ *               BaseAddress : The base address you whant the binay file should run from
  *               cpuarch     : if it exists diffent cpu from a manufactor like pentium,
- *                             pentinum-mmx so on, use this flag to specify which type 
+ *                             pentinum-mmx so on, use this flag to specify which type
  *                             of cpu you whant or do not use it if it does not exists
  *                             other or any sub model.
  *
  *                mode       : if we should run disambler of this binary or
  *                             translate it, Disambler will not calc the
  *                             the row name right so we simple give each
-                               row a name. In translations mode we run a 
- *                             analys so we getting better optimzing and 
+                               row a name. In translations mode we run a
+ *                             analys so we getting better optimzing and
  *                             only row name there we need.
  *                             value for mode are :
  *                                                  0 = disambler mode
  *                                                  1 = translate mode intel
+
  *
  * Return value :
- *               value -1            : unimplement 
+ *               value -1            : unimplement
  *               value  0            : wrong opcode or not vaild opcode
  *               value +1 and higher : who many byte we should add to cpu_pos
  */
+
 CPU_INT ARM_( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
                    CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
 
 {
-    /* 
+    /*
      * ConvertBitToByte() is perfect to use to get the bit being in use from a bit array
-     * GetMaskByte() is perfect if u whant known which bit have been mask out 
+     * GetMaskByte() is perfect if u whant known which bit have been mask out
      * see M68kopcode.c and how it use the ConvertBitToByte()
      */
 
index eb0f06b..52cfcde 100644 (file)
@@ -12,6 +12,6 @@ CPU_INT IA32Brain(  CPU_BYTE *cpu_buffer,
 CPU_INT IA32_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
 
 
-/* Export comment thing see m68k for example 
+/* Export comment thing see m68k for example
  * in dummy we do not show it, for it is diffent for each cpu
  */
index fc24755..e97ad41 100644 (file)
@@ -1,6 +1,6 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "IA32Brain.h"
 #include "IA32.h"
 #include "../../any_op.h"
@@ -9,16 +9,16 @@
 
 
 
-/* 
- * DummyBrain is example how you create you own cpu brain to translate from 
+/*
+ * DummyBrain is example how you create you own cpu brain to translate from
  * cpu to intel assembler, I have not add DummyBrain to the loader it is not
  * need it in our example. When you write you own brain, it must be setup in
  * misc.c function LoadPFileImage and PEFileStart, PEFileStart maybe does not
  * need the brain you have writen so you do not need setup it there then.
  *
- * input param: 
+ * input param:
  *         cpu_buffer   : the memory buffer with loaded program we whant translate
- *         cpu_pos      : the positions in the cpu_buffer 
+ *         cpu_pos      : the positions in the cpu_buffer
  *         cpu_size     : the alloced memory size of the cpu_buffer
  *         BaseAddress  : the virtual memory address we setup to use.
  *         cpuarch      : the sub arch for the brain, example if it exists more one
  *           mode       : if we should run disambler of this binary or
  *                        translate it, Disambler will not calc the
  *                        the row name right so we simple give each
-                          row a name. In translations mode we run a 
- *                        analys so we getting better optimzing and 
+                          row a name. In translations mode we run a
+ *                        analys so we getting better optimzing and
  *                        only row name there we need.
  *                        value for mode are :
  *                                             0 = disambler mode
  *                                             1 = translate mode intel
  *
  * return value
- *         0            : Ok 
- *         1            : unimplemt 
+ *         0            : Ok
+ *         1            : unimplemt
  *         2            : Unkonwn Opcode
  *         3            : unimplement cpu
  *         4            : unknown machine
@@ -64,10 +64,10 @@ CPU_INT IA32Brain(  CPU_BYTE *cpu_buffer,
            to read from the memory the
            Le is for small endian and the
            Be is for big endian
-           the 32 is how many bits we should read 
+           the 32 is how many bits we should read
          */
         cpuint = GetData32Be(&cpu_buffer[cpu_pos]);
-    
+
         /* Add */
         if ((cpuint - (cpuint & GetMaskByte(cpuIA32Init_Add))) == ConvertBitToByte(cpuIA32Init_Add))
         {
@@ -78,7 +78,7 @@ CPU_INT IA32Brain(  CPU_BYTE *cpu_buffer,
             else
                  cpu_pos += retsize;
         }
-    
+
         /* Found all Opcode and breakout and return no error found */
         if (cpu_pos >=cpu_size)
         {
@@ -87,11 +87,11 @@ CPU_INT IA32Brain(  CPU_BYTE *cpu_buffer,
 
         /* Check if we have found a cpu opcode */
         if (cpu_oldpos == cpu_pos)
-        {            
+        {
             if (retcode == 0)
-            {              
+            {
                 /* no unimplement error where found so we return a msg for unknown opcode */
-                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);                
+                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);
                 retcode = 2;
             }
         }
index 7183fba..e141630 100644 (file)
@@ -3,10 +3,10 @@
 #include "../../misc.h"
 
 
-/* example how setup a opcode, this opcode is 16bit long (taken from M68K) 
- * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent 
- * thing in the opcode, example which reg so on, it can be etither 0 or 1 in 
- * the opcode. but a opcode have also normal bit that is always been set to 
+/* example how setup a opcode, this opcode is 16bit long (taken from M68K)
+ * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent
+ * thing in the opcode, example which reg so on, it can be etither 0 or 1 in
+ * the opcode. but a opcode have also normal bit that is always been set to
  * same. thuse bit are always 0 or 1
  */
 CPU_BYTE cpuIA32Init_Add[16] = {1,1,0,1,2,2,2,2,2,2,2,2,2,2,2,2};
index c873add..5ed4292 100644 (file)
@@ -1,45 +1,45 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "IA32.h"
 #include "../../misc.h"
 
 
 /* cpuDummyInit_Add
- * Input param : 
- *               out         : The file pointer that we write to (the output file to intel asm) 
+ * Input param :
+ *               out         : The file pointer that we write to (the output file to intel asm)
  *               cpu_buffer  : The memory buffer we have our binary code that we whant convert
- *               cpu_pos     : Current positions in the cpu_buffer 
+ *               cpu_pos     : Current positions in the cpu_buffer
  *               cpu_size    : The memory size of the cpu_buffer
- *               BaseAddress : The base address you whant the binay file should run from 
+ *               BaseAddress : The base address you whant the binay file should run from
  *               cpuarch     : if it exists diffent cpu from a manufactor like pentium,
- *                             pentinum-mmx so on, use this flag to specify which type 
+ *                             pentinum-mmx so on, use this flag to specify which type
  *                             of cpu you whant or do not use it if it does not exists
  *                             other or any sub model.
  *
  *                mode       : if we should run disambler of this binary or
  *                             translate it, Disambler will not calc the
  *                             the row name right so we simple give each
-                               row a name. In translations mode we run a 
- *                             analys so we getting better optimzing and 
+                               row a name. In translations mode we run a
+ *                             analys so we getting better optimzing and
  *                             only row name there we need.
  *                             value for mode are :
  *                                                  0 = disambler mode
  *                                                  1 = translate mode intel
  *
  * Return value :
- *               value -1            : unimplement 
+ *               value -1            : unimplement
  *               value  0            : wrong opcode or not vaild opcode
  *               value +1 and higher : who many byte we should add to cpu_pos
  */
+
 CPU_INT IA32_Add( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
                    CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
 
 {
-    /* 
+    /*
      * ConvertBitToByte() is perfect to use to get the bit being in use from a bit array
-     * GetMaskByte() is perfect if u whant known which bit have been mask out 
+     * GetMaskByte() is perfect if u whant known which bit have been mask out
      * see M68kopcode.c and how it use the ConvertBitToByte()
      */
 
index dd3a39c..e6c9598 100644 (file)
@@ -16,7 +16,7 @@ CPU_INT PPC_mr( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT c
 CPU_INT PPC_Stw( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
 CPU_INT PPC_Stwu( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
 
-/* Export comment thing see m68k for example 
+/* Export comment thing see m68k for example
  * in dummy we do not show it, for it is diffent for each cpu
  */
 
index 9a5fd2c..ac47a61 100644 (file)
@@ -1,20 +1,20 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "PPCBrain.h"
 #include "PPC.h"
 #include "../../misc.h"
 
-/* 
- * DummyBrain is example how you create you own cpu brain to translate from 
+/*
+ * DummyBrain is example how you create you own cpu brain to translate from
  * cpu to intel assembler, I have not add DummyBrain to the loader it is not
  * need it in our example. When you write you own brain, it must be setup in
  * misc.c function LoadPFileImage and PEFileStart, PEFileStart maybe does not
  * need the brain you have writen so you do not need setup it there then.
  *
- * input param: 
+ * input param:
  *         cpu_buffer   : the memory buffer with loaded program we whant translate
- *         cpu_pos      : the positions in the cpu_buffer 
+ *         cpu_pos      : the positions in the cpu_buffer
  *         cpu_size     : the alloced memory size of the cpu_buffer
  *         BaseAddress  : the virtual memory address we setup to use.
  *         cpuarch      : the sub arch for the brain, example if it exists more one
  *           mode       : if we should run disambler of this binary or
  *                        translate it, Disambler will not calc the
  *                        the row name right so we simple give each
-                          row a name. In translations mode we run a 
- *                        analys so we getting better optimzing and 
+                          row a name. In translations mode we run a
+ *                        analys so we getting better optimzing and
  *                        only row name there we need.
  *                        value for mode are :
  *                                             0 = disambler mode
  *                                             1 = translate mode intel
  *
  * return value
- *         0            : Ok 
- *         1            : unimplemt 
+ *         0            : Ok
+ *         1            : unimplemt
  *         2            : Unkonwn Opcode
  *         3            : unimplement cpu
  *         4            : unknown machine
@@ -121,11 +121,11 @@ CPU_INT PPCBrain(    CPU_BYTE *cpu_buffer,
 
         /* Check if we have found a cpu opcode */
         if (cpu_oldpos == cpu_pos)
-        {            
+        {
             if (retcode == 0)
-            {              
+            {
                 /* no unimplement error where found so we return a msg for unknown opcode */
-                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);                
+                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);
                 retcode = 2;
             }
         }
index 5cf50ef..2fd436d 100644 (file)
@@ -2,10 +2,10 @@
 #include "../../misc.h"
 
 
-/* example how setup a opcode, this opcode is 16bit long (taken from M68K) 
- * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent 
- * thing in the opcode, example which reg so on, it can be etither 0 or 1 in 
- * the opcode. but a opcode have also normal bit that is always been set to 
+/* example how setup a opcode, this opcode is 16bit long (taken from M68K)
+ * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent
+ * thing in the opcode, example which reg so on, it can be etither 0 or 1 in
+ * the opcode. but a opcode have also normal bit that is always been set to
  * same. thuse bit are always 0 or 1
  */
 
@@ -22,7 +22,7 @@ CPU_BYTE cpuPPCInit_lwz[32]   = {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
 
 /* mask */
 /*
- * no mask  we implement function getting the reg right 
+ * no mask  we implement function getting the reg right
  */
 
 /* bit index
index ffe7157..65323b2 100644 (file)
@@ -1,28 +1,28 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "PPC.h"
 #include "../../misc.h"
 #include "../../any_op.h"
 
-/* reg r0-r31 
+/* reg r0-r31
   r3 = eax
  */
 
 /* cpuDummyInit_Add
- * Input param : 
- *               out         : The file pointer that we write to (the output file to intel asm) 
+ * Input param :
+ *               out         : The file pointer that we write to (the output file to intel asm)
  *               cpu_buffer  : The memory buffer we have our binary code that we whant convert
- *               cpu_pos     : Current positions in the cpu_buffer 
+ *               cpu_pos     : Current positions in the cpu_buffer
  *               cpu_size    : The memory size of the cpu_buffer
- *               BaseAddress : The base address you whant the binay file should run from 
+ *               BaseAddress : The base address you whant the binay file should run from
  *               cpuarch     : if it exists diffent cpu from a manufactor like pentium,
- *                             pentinum-mmx so on, use this flag to specify which type 
+ *                             pentinum-mmx so on, use this flag to specify which type
  *                             of cpu you whant or do not use it if it does not exists
  *                             other or any sub model.
  *
  * Return value :
- *               value -1            : unimplement 
+ *               value -1            : unimplement
  *               value  0            : wrong opcode or not vaild opcode
  *               value +1 and higher : who many byte we should add to cpu_pos
  */
index fab485d..4e044e2 100644 (file)
@@ -12,6 +12,6 @@ CPU_INT DummyBrain(  CPU_BYTE *cpu_buffer,
 CPU_INT DUMMY_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
 
 
-/* Export comment thing see m68k for example 
+/* Export comment thing see m68k for example
  * in dummy we do not show it, for it is diffent for each cpu
  */
index aa285a8..67d20e2 100644 (file)
@@ -1,22 +1,22 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "DummyBrain.h"
 #include "Dummy.h"
 #include "../../misc.h"
 
 
 
-/* 
- * DummyBrain is example how you create you own cpu brain to translate from 
+/*
+ * DummyBrain is example how you create you own cpu brain to translate from
  * cpu to intel assembler, I have not add DummyBrain to the loader it is not
  * need it in our example. When you write you own brain, it must be setup in
  * misc.c function LoadPFileImage and PEFileStart, PEFileStart maybe does not
  * need the brain you have writen so you do not need setup it there then.
  *
- * input param: 
+ * input param:
  *         cpu_buffer   : the memory buffer with loaded program we whant translate
- *         cpu_pos      : the positions in the cpu_buffer 
+ *         cpu_pos      : the positions in the cpu_buffer
  *         cpu_size     : the alloced memory size of the cpu_buffer
  *         BaseAddress  : the virtual memory address we setup to use.
  *         cpuarch      : the sub arch for the brain, example if it exists more one
@@ -24,8 +24,8 @@
  *         outfp        : the output file pointer
  *
  * return value
- *         0            : Ok 
- *         1            : unimplemt 
+ *         0            : Ok
+ *         1            : unimplemt
  *         2            : Unkonwn Opcode
  *         3            : unimplement cpu
  *         4            : unknown machine
@@ -52,10 +52,10 @@ CPU_INT DummyBrain(  CPU_BYTE *cpu_buffer,
            to read from the memory the
            Le is for small endian and the
            Be is for big endian
-           the 32 is how many bits we should read 
+           the 32 is how many bits we should read
          */
         cpuint = GetData32Be(&cpu_buffer[cpu_pos]);
-    
+
         /* Add */
         if ((cpuint - (cpuint & GetMaskByte(cpuDummyInit_Add))) == ConvertBitToByte(cpuDummyInit_Add))
         {
@@ -66,7 +66,7 @@ CPU_INT DummyBrain(  CPU_BYTE *cpu_buffer,
             else
                  cpu_pos += retsize;
         }
-    
+
         /* Found all Opcode and breakout and return no error found */
         if (cpu_pos >=cpu_size)
         {
@@ -75,11 +75,11 @@ CPU_INT DummyBrain(  CPU_BYTE *cpu_buffer,
 
         /* Check if we have found a cpu opcode */
         if (cpu_oldpos == cpu_pos)
-        {            
+        {
             if (retcode == 0)
-            {              
+            {
                 /* no unimplement error where found so we return a msg for unknown opcode */
-                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);                
+                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);
                 retcode = 2;
             }
         }
index 24248dd..02355bc 100644 (file)
@@ -2,10 +2,10 @@
 #include "../../misc.h"
 
 
-/* example how setup a opcode, this opcode is 16bit long (taken from M68K) 
- * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent 
- * thing in the opcode, example which reg so on, it can be etither 0 or 1 in 
- * the opcode. but a opcode have also normal bit that is always been set to 
+/* example how setup a opcode, this opcode is 16bit long (taken from M68K)
+ * 0 and 1 mean normal bit, 2 mean mask bit the bit that are determent diffent
+ * thing in the opcode, example which reg so on, it can be etither 0 or 1 in
+ * the opcode. but a opcode have also normal bit that is always been set to
  * same. thuse bit are always 0 or 1
  */
 CPU_BYTE cpuDummyInit_Add[16] = {1,1,0,1,2,2,2,2,2,2,2,2,2,2,2,2};
index 5850a15..2dda611 100644 (file)
@@ -1,34 +1,34 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "Dummy.h"
 #include "../../misc.h"
 
 
 /* cpuDummyInit_Add
- * Input param : 
- *               out         : The file pointer that we write to (the output file to intel asm) 
+ * Input param :
+ *               out         : The file pointer that we write to (the output file to intel asm)
  *               cpu_buffer  : The memory buffer we have our binary code that we whant convert
- *               cpu_pos     : Current positions in the cpu_buffer 
+ *               cpu_pos     : Current positions in the cpu_buffer
  *               cpu_size    : The memory size of the cpu_buffer
- *               BaseAddress : The base address you whant the binay file should run from 
+ *               BaseAddress : The base address you whant the binay file should run from
  *               cpuarch     : if it exists diffent cpu from a manufactor like pentium,
- *                             pentinum-mmx so on, use this flag to specify which type 
+ *                             pentinum-mmx so on, use this flag to specify which type
  *                             of cpu you whant or do not use it if it does not exists
  *                             other or any sub model.
  * Return value :
- *               value -1            : unimplement 
+ *               value -1            : unimplement
  *               value  0            : wrong opcode or not vaild opcode
  *               value +1 and higher : who many byte we should add to cpu_pos
  */
+
 CPU_INT DUMMY_Add( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
                    CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
 
 {
-    /* 
+    /*
      * ConvertBitToByte() is perfect to use to get the bit being in use from a bit array
-     * GetMaskByte() is perfect if u whant known which bit have been mask out 
+     * GetMaskByte() is perfect if u whant known which bit have been mask out
      * see M68kopcode.c and how it use the ConvertBitToByte()
      */
 
index 6e2dd5a..f33098b 100644 (file)
@@ -1,20 +1,20 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "M68kBrain.h"
 #include "m68k.h"
 #include "../../misc.h"
 
-/* 
- * DummyBrain is example how you create you own cpu brain to translate from 
+/*
+ * DummyBrain is example how you create you own cpu brain to translate from
  * cpu to intel assembler, I have not add DummyBrain to the loader it is not
  * need it in our example. When you write you own brain, it must be setup in
  * misc.c function LoadPFileImage and PEFileStart, PEFileStart maybe does not
  * need the brain you have writen so you do not need setup it there then.
  *
- * input param: 
+ * input param:
  *         cpu_buffer   : the memory buffer with loaded program we whant translate
- *         cpu_pos      : the positions in the cpu_buffer 
+ *         cpu_pos      : the positions in the cpu_buffer
  *         cpu_size     : the alloced memory size of the cpu_buffer
  *         BaseAddress  : the virtual memory address we setup to use.
  *         cpuarch      : the sub arch for the brain, example if it exists more one
@@ -22,8 +22,8 @@
  *         outfp        : the output file pointer
  *
  * return value
- *         0            : Ok 
- *         1            : unimplemt 
+ *         0            : Ok
+ *         1            : unimplemt
  *         2            : Unkonwn Opcode
  *         3            : unimplement cpu
  *         4            : unknown machine
@@ -47,7 +47,7 @@ CPU_INT M68KBrain(   CPU_BYTE *cpu_buffer,
         cpu_oldpos = cpu_pos;
 
         cpuint = cpu_buffer[cpu_pos];
-    
+
         /* Abcd */
         if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Abcd))) == ConvertBitToByte(cpuM68kInit_Abcd))
         {
@@ -120,7 +120,7 @@ CPU_INT M68KBrain(   CPU_BYTE *cpu_buffer,
         }
         /* AndToCCR */
         if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_AndToCCRF))) == ConvertBitToByte(cpuM68kInit_AndToCCRF))
-        {            
+        {
             cpuint = cpu_buffer[cpu_pos+1];
             if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_AndToCCRS))) == ConvertBitToByte(cpuM68kInit_AndToCCRS))
             {
@@ -300,11 +300,11 @@ CPU_INT M68KBrain(   CPU_BYTE *cpu_buffer,
 
         /* Check if we have found a cpu opcode */
         if (cpu_oldpos == cpu_pos)
-        {            
+        {
             if (retcode == 0)
-            {              
+            {
                 /* no unimplement error where found so we return a msg for unknown opcode */
-                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);                
+                printf("Unkonwn Opcode found at 0x%8x opcode 0x%2x\n",cpu_oldpos+BaseAddress,(unsigned int)cpu_buffer[cpu_oldpos]);
                 retcode = 2;
             }
         }
@@ -316,5 +316,5 @@ CPU_INT M68KBrain(   CPU_BYTE *cpu_buffer,
             break;
         }
     }
-    return retcode;    
+    return retcode;
 }
index 7fb28d1..f140b1e 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "../../misc.h"
 
-CPU_BYTE cpuM68kInit_Abcd[16]      = {1,1,1,1,2,2,2,1,0,0,0,0,2,2,2,2}; 
+CPU_BYTE cpuM68kInit_Abcd[16]      = {1,1,1,1,2,2,2,1,0,0,0,0,2,2,2,2};
 CPU_BYTE cpuM68kInit_Add[16]       = {1,1,0,1,2,2,2,2,2,2,2,2,2,2,2,2};
 CPU_BYTE cpuM68kInit_Addi[16]      = {0,0,0,0,0,1,1,0,2,2,2,2,2,2,2,2};
 CPU_BYTE cpuM68kInit_Addq[16]      = {0,1,0,1,2,2,2,0,2,2,2,2,2,2,2,2};
index 5bfb339..0071681 100644 (file)
@@ -1,6 +1,6 @@
 
 #include <stdio.h>
-#include <stdlib.h> 
+#include <stdlib.h>
 #include "m68k.h"
 #include "misc.h"
 
@@ -22,7 +22,7 @@ CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
     CPU_INT Rx;
     CPU_INT Ry;
     //CPU_INT cpuint;
-            
+
     opmode = ConvertBitToByte(M68k_Opmode);
     mode = ConvertBitToByte(M68k_Mode);
     Rx = ConvertBitToByte(M68k_Rx);
@@ -32,9 +32,9 @@ CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
 
     if (opmode == 0x00)
     {
-        /* <ea> + Dn -> Dn */  
+        /* <ea> + Dn -> Dn */
         printf(";Add unimplement of  \"<ea> + Dn -> Dn\" \n");
-        
+
     }
 
     if (opmode == 0x01)
@@ -54,7 +54,7 @@ CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
         /* <ea> + An -> An */
         printf(";Add unimplement of \"<ea> + An -> An\" \n");
     }
-    
+
     if (opmode == 0x04)
     {
         /* Dn + <ea> -> <ea> */
@@ -80,9 +80,9 @@ CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
     }
 
 
-    
 
-    
+
+
     return -1;
 }
 
index 926be30..0e8c67c 100644 (file)
@@ -13,7 +13,7 @@ static  CPU_INT machine_type = 0;
 //static  CPU_INT ToMachine_type = IMAGE_FILE_MACHINE_I386;\r
 static  CPU_INT ToMachine_type = IMAGE_FILE_MACHINE_POWERPC;\r
 /*\r
- * infileName       file name to convert or disambler \r
+ * infileName       file name to convert or disambler\r
  * outputfileName   file name to save to\r
  * BaseAddress      the address we should emulate\r
  * cpuid            the cpu we choice not vaild for pe loader\r
@@ -21,7 +21,7 @@ static  CPU_INT ToMachine_type = IMAGE_FILE_MACHINE_POWERPC;
  * mode             disambler mode : 0 the arch cpu.\r
  *                  translate mode : 1 intel\r
  *                  translate mode : 2 ppc\r
- * \r
+ *\r
  */\r
 \r
 static void SetCPU(CPU_INT FromCpu, CPU_INT mode)\r
@@ -57,18 +57,18 @@ static void Convert(FILE *outfp, CPU_INT FromCpu, CPU_INT mode)
 }\r
 \r
 \r
-CPU_INT LoadPFileImage( char *infileName, char *outputfileName, \r
+CPU_INT LoadPFileImage( char *infileName, char *outputfileName,\r
                      CPU_UNINT BaseAddress, char *cpuid,\r
                      CPU_UNINT type, CPU_INT mode)\r
 {\r
     FILE *infp;\r
     FILE *outfp;\r
-    CPU_BYTE *cpu_buffer;   \r
+    CPU_BYTE *cpu_buffer;\r
     CPU_UNINT cpu_pos = 0;\r
     CPU_UNINT cpu_size=0;\r
     CPU_INT ret;\r
      //fopen("testms.exe","RB");\r
-    \r
+\r
 \r
     /* Open file for read */\r
 \r
@@ -94,7 +94,7 @@ CPU_INT LoadPFileImage( char *infileName, char *outputfileName,
         fclose(outfp);\r
         return 5;\r
     }\r
-    \r
+\r
     /* get the memory size buffer */\r
     cpu_size = ftell(infp);\r
     if (ferror(infp))\r
@@ -145,7 +145,7 @@ CPU_INT LoadPFileImage( char *infileName, char *outputfileName,
     }\r
     fclose(infp);\r
 \r
-    if (type==0) \r
+    if (type==0)\r
     {\r
        if ( PEFileStart(cpu_buffer, 0, BaseAddress, cpu_size, outfp, mode) !=0)\r
        {\r
@@ -238,7 +238,7 @@ CPU_INT LoadPFileImage( char *infileName, char *outputfileName,
         }\r
     }\r
 \r
-    if (type==2) \r
+    if (type==2)\r
     {\r
 \r
        ret = PEFileStart(cpu_buffer, 0, BaseAddress, cpu_size, outfp, mode);\r
@@ -371,8 +371,8 @@ CPU_INT PEFileStart( CPU_BYTE *memory, CPU_UNINT pos,
                  SectionHeader[i].VirtualAddress + SectionHeader[i].SizeOfRawData > (ULONG)NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress)\r
             {\r
                   ExportEntry = (PIMAGE_NT_HEADERS) (((ULONG)memory) +\r
-                                (ULONG)(NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress - \r
-                                SectionHeader[i].VirtualAddress + \r
+                                (ULONG)(NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress -\r
+                                SectionHeader[i].VirtualAddress +\r
                                 SectionHeader[i].PointerToRawData));\r
             }\r
         }\r
index 0178aa7..47770c5 100644 (file)
@@ -5,7 +5,7 @@
 #define OP_ANY_mov  0x00000000
 #define OP_ANY_ret  0x00000001
 
-/* We are using same abi as PPC 
+/* We are using same abi as PPC
  * eax = register 3
  * edx = register 4
  * esp = register 1
@@ -46,8 +46,8 @@ typedef struct _BrainAnalys
 
     CPU_UNINT memAdr; /* where are we in the current memory pos + baseaddress */
 
-    CPU_INT row; /* 0 = no row, 
-                  * 1 = row is bcc (conditions), 
+    CPU_INT row; /* 0 = no row,
+                  * 1 = row is bcc (conditions),
                   * 2 = row is jsr (Call)
                   */
 
@@ -59,14 +59,14 @@ typedef struct _BrainAnalys
 extern PMYBrainAnalys pMyBrainAnalys;     /* current working address */
 extern PMYBrainAnalys pStartMyBrainAnalys; /* start address */
 
-CPU_INT ConvertToIA32Process( FILE *outfp, 
-                               PMYBrainAnalys pMystart, 
+CPU_INT ConvertToIA32Process( FILE *outfp,
+                               PMYBrainAnalys pMystart,
                                PMYBrainAnalys pMyend, CPU_INT regbits,
                                CPU_INT HowManyRegInUse,
                                CPU_INT *RegTableCount);
 
-CPU_INT ConvertToPPCProcess( FILE *outfp, 
-                               PMYBrainAnalys pMystart, 
+CPU_INT ConvertToPPCProcess( FILE *outfp,
+                               PMYBrainAnalys pMystart,
                                PMYBrainAnalys pMyend, CPU_INT regbits,
                                CPU_INT HowManyRegInUse,
                                CPU_INT *RegTableCount);
index ce10cea..2267eb9 100644 (file)
@@ -25,7 +25,7 @@
        <file>From/dummycpu/Dummyopcode.c</file>
 
        <file>ImageLoader.c</file>
-       <file>AnyalsingProcess.c</file> 
+       <file>AnyalsingProcess.c</file>
        <file>ConvertingProcess.c</file>
        <file>ConvertToIA32Process.c</file>
        <file>ConvertToPPCProcess.c</file>
index 5062bd1..0a3c86d 100644 (file)
 #include "From/PPC/PPC.h"
 
 
-/* retun 
- * 0 = Ok 
- * 1 = unimplemt 
- * 2 = Unkonwn Opcode 
+/* retun
+ * 0 = Ok
+ * 1 = unimplemt
+ * 2 = Unkonwn Opcode
  * 3 = can not open read file
  * 4 = can not open write file
  * 5 = can not seek to end of read file
@@ -41,7 +41,7 @@ CPU_UNINT ConvertBitToByte(CPU_BYTE *bit)
 
     for(t=size;t>=0;t--)
     {
-        if (bit[size-t] != 2) 
+        if (bit[size-t] != 2)
             Byte = Byte + (bit[size-t]<<t);
     }
     return Byte;
@@ -56,8 +56,8 @@ CPU_UNINT GetMaskByte(CPU_BYTE *bit)
 
     for(t=size;t>=0;t--)
     {
-        if (bit[size-t] == 2) 
-        {            
+        if (bit[size-t] == 2)
+        {
             MaskByte = MaskByte + ( (bit[size-t]-1) <<t);
         }
     }
@@ -73,7 +73,7 @@ CPU_UNINT ConvertBitToByte32(CPU_BYTE *bit)
 
     for(t=size;t>=0;t--)
     {
-        if (bit[size-t] != 2) 
+        if (bit[size-t] != 2)
             Byte = Byte + (bit[size-t]<<t);
     }
     return Byte;
@@ -88,8 +88,8 @@ CPU_UNINT GetMaskByte32(CPU_BYTE *bit)
 
     for(t=size;t>=0;t--)
     {
-        if (bit[size-t] == 2) 
-        {            
+        if (bit[size-t] == 2)
+        {
             MaskByte = MaskByte + ( (bit[size-t]-1) <<t);
         }
     }
@@ -154,7 +154,7 @@ CPU_INT AllocAny()
 
         pMyBrainAnalys->ptr_next = (CPU_BYTE*)tmp;
         tmp->ptr_prev= (CPU_BYTE*)pMyBrainAnalys;
-        
+
         pMyBrainAnalys = tmp;
     }
 return 0;
index fd1862d..8a4d296 100644 (file)
@@ -46,18 +46,18 @@ int main(int argc, char* argv[])
        HANDLE hThread;
        DWORD ThreadId;
        SECURITY_ATTRIBUTES sa;
-       
+
        // Set up the security attributes struct.
        sa.nLength= sizeof(SECURITY_ATTRIBUTES);
        sa.lpSecurityDescriptor = NULL;
        sa.bInheritHandle = TRUE;
-       
-       
+
+
        // Create the child output pipe.
        if (!CreatePipe(&hOutputReadTmp,&hOutputWrite,&sa,0))
                DisplayError("CreatePipe");
-       
-       
+
+
        // Create a duplicate of the output write handle for the std error
        // write handle. This is necessary in case the child application
        // closes one of its std output handles.
@@ -65,13 +65,13 @@ int main(int argc, char* argv[])
                GetCurrentProcess(),&hErrorWrite,0,
                TRUE,DUPLICATE_SAME_ACCESS))
                DisplayError("DuplicateHandle");
-       
-       
+
+
        // Create the child input pipe.
        if (!CreatePipe(&hInputRead,&hInputWriteTmp,&sa,0))
                DisplayError("CreatePipe");
-       
-       
+
+
        // Create new output read handle and the input write handles. Set
        // the Properties to FALSE. Otherwise, the child inherits the
        // properties and, as a result, non-closeable handles to the pipes
@@ -82,27 +82,27 @@ int main(int argc, char* argv[])
                0,FALSE, // Make it uninheritable.
                DUPLICATE_SAME_ACCESS))
                DisplayError("DupliateHandle");
-       
+
        if (!DuplicateHandle(GetCurrentProcess(),hInputWriteTmp,
                GetCurrentProcess(),
                &hInputWrite, // Address of new handle.
                0,FALSE, // Make it uninheritable.
                DUPLICATE_SAME_ACCESS))
                DisplayError("DupliateHandle");
-       
-       
+
+
        // Close inheritable copies of the handles you do not want to be
        // inherited.
        if (!CloseHandle(hOutputReadTmp)) DisplayError("CloseHandle");
        if (!CloseHandle(hInputWriteTmp)) DisplayError("CloseHandle");
-       
-       
+
+
        // Get std input handle so you can close it and force the ReadFile to
        // fail when you want the input thread to exit.
        if ( (hStdIn = GetStdHandle(STD_INPUT_HANDLE)) ==
                INVALID_HANDLE_VALUE )
                DisplayError("GetStdHandle");
-       
+
        SetConsoleTitle("gdb control console");
 
        size_t size = strlen(GDB_INITIAL_COMMAND)+PARAMS_SEPARATOR_LEN;
@@ -128,8 +128,8 @@ int main(int argc, char* argv[])
        }
 
        PrepAndLaunchRedirectedChild(hOutputWrite,hInputRead,hErrorWrite,pszCommandLine);
-       
-       
+
+
        // Close pipe handles (do not continue to modify the parent).
        // You need to make sure that no handles to the write end of the
        // output pipe are maintained in this process or else the pipe will
@@ -137,39 +137,39 @@ int main(int argc, char* argv[])
        if (!CloseHandle(hOutputWrite)) DisplayError("CloseHandle");
        if (!CloseHandle(hInputRead )) DisplayError("CloseHandle");
        if (!CloseHandle(hErrorWrite)) DisplayError("CloseHandle");
-       
-       
+
+
        // Launch the thread that gets the input and sends it to the child.
        hThread = CreateThread(NULL,0,GetAndSendInputThread,
                (LPVOID)hInputWrite,0,&ThreadId);
        if (hThread == NULL) DisplayError("CreateThread");
-       
-       
+
+
        // Read the child's output.
        ReadAndHandleOutput(hOutputRead);
        // Redirection is complete
-       
-       
+
+
        // Force the read on the input to return by closing the stdin handle.
        if (!CloseHandle(hStdIn)) DisplayError("CloseHandle");
-       
-       
+
+
        // Tell the thread to exit and wait for thread to die.
        bRunThread = FALSE;
-       
+
        if (WaitForSingleObject(hThread,INFINITE) == WAIT_FAILED)
                DisplayError("WaitForSingleObject");
-       
+
        if (!CloseHandle(hOutputRead)) DisplayError("CloseHandle");
        if (!CloseHandle(hInputWrite)) DisplayError("CloseHandle");
 
        return 0;
 }
 
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 // PrepAndLaunchRedirectedChild
 // Sets up STARTUPINFO structure, and launches redirected child.
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 void PrepAndLaunchRedirectedChild(HANDLE hChildStdOut,
                                                                  HANDLE hChildStdIn,
                                                                  HANDLE hChildStdErr,
@@ -177,7 +177,7 @@ void PrepAndLaunchRedirectedChild(HANDLE hChildStdOut,
 {
        PROCESS_INFORMATION pi;
        STARTUPINFO si;
-       
+
        // Set up the start up info struct.
        ZeroMemory(&si,sizeof(STARTUPINFO));
        si.cb = sizeof(STARTUPINFO);
@@ -190,8 +190,8 @@ void PrepAndLaunchRedirectedChild(HANDLE hChildStdOut,
        //     si.wShowWindow = SW_HIDE;
        // Note that dwFlags must include STARTF_USESHOWWINDOW if you want to
        // use the wShowWindow flags.
-       
-       
+
+
        // Launch the process that you want to redirect (in this case,
        // Child.exe). Make sure Child.exe is in the same directory as
        // redirect.c launch redirect from a command line to prevent location
@@ -199,26 +199,26 @@ void PrepAndLaunchRedirectedChild(HANDLE hChildStdOut,
        if (!CreateProcess(NULL,pchCommandLine,NULL,NULL,TRUE,
                CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi))
                DisplayError("CreateProcess");
-       
-       
+
+
        // Set global child process handle to cause threads to exit.
        hChildProcess = pi.hProcess;
-       
-       
+
+
        // Close any unnecessary handles.
        if (!CloseHandle(pi.hThread)) DisplayError("CloseHandle");
 }
 
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 // ReadAndHandleOutput
 // Monitors handle for input. Exits when child exits or pipe breaks.
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 void ReadAndHandleOutput(HANDLE hPipeRead)
 {
        CHAR lpBuffer[256];
        DWORD nBytesRead;
        DWORD nCharsWritten;
-       
+
        while(TRUE)
        {
                if (!ReadFile(hPipeRead,lpBuffer,sizeof(lpBuffer),
@@ -229,7 +229,7 @@ void ReadAndHandleOutput(HANDLE hPipeRead)
             else
                                DisplayError("ReadFile"); // Something bad happened.
                }
-               
+
                // Display the character read on the screen.
                if (!WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),lpBuffer,
                        nBytesRead,&nCharsWritten,NULL))
@@ -238,26 +238,26 @@ void ReadAndHandleOutput(HANDLE hPipeRead)
 }
 
 
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 // GetAndSendInputThread
 // Thread procedure that monitors the console for input and sends input
 // to the child process through the input pipe.
 // This thread ends when the child application exits.
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 DWORD WINAPI GetAndSendInputThread(LPVOID lpvThreadParam)
 {
        CHAR read_buff[256];
        DWORD nBytesRead,nBytesWrote;
        HANDLE hPipeWrite = (HANDLE)lpvThreadParam;
-       
+
        // Get input from our console and send it to child through the pipe.
        while (bRunThread)
        {
                if(!ReadConsole(hStdIn,read_buff,1,&nBytesRead,NULL))
             DisplayError("ReadConsole");
-               
+
                read_buff[nBytesRead] = '\0'; // Follow input with a NULL.
-               
+
                if (!WriteFile(hPipeWrite,read_buff,nBytesRead,&nBytesWrote,NULL))
                {
             if (GetLastError() == ERROR_NO_DATA)
@@ -266,33 +266,33 @@ DWORD WINAPI GetAndSendInputThread(LPVOID lpvThreadParam)
                                DisplayError("WriteFile");
                }
        }
-       
+
        return 1;
 }
 
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 // DisplayError
 // Displays the error number and corresponding message.
-/////////////////////////////////////////////////////////////////////// 
+///////////////////////////////////////////////////////////////////////
 void DisplayError(char *pszAPI)
 {
        LPVOID lpvMessageBuffer;
        CHAR szPrintBuffer[512];
        DWORD nCharsWritten;
-       
+
        FormatMessage(
                FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
                NULL, GetLastError(),
                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                (LPTSTR)&lpvMessageBuffer, 0, NULL);
-       
+
        wsprintf(szPrintBuffer,
                "ERROR: API    = %s.\n   error code = %d.\n   message    = %s.\n",
                pszAPI, GetLastError(), (char *)lpvMessageBuffer);
-       
+
        WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE),szPrintBuffer,
                lstrlen(szPrintBuffer),&nCharsWritten,NULL);
-       
+
        LocalFree(lpvMessageBuffer);
        ExitProcess(GetLastError());
 }
index 5e97c95..b7d6e77 100644 (file)
@@ -85,7 +85,7 @@ HandleList_Update(HWND hHandleListCtrl, HANDLE ProcessId)
                if ( ((ProcessId != (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) != 0)) ||\r
                     ((ProcessId == (HANDLE)1) && ((pEntry->Type & GDI_HANDLE_BASETYPE_MASK) == 0)) )\r
                {\r
-                       if (ProcessId == (HANDLE)1 || \r
+                       if (ProcessId == (HANDLE)1 ||\r
                            ProcessId == (HANDLE)((ULONG)pEntry->ProcessId & 0xfffc))\r
                        {\r
                                handle = GDI_HANDLE_CREATE(i, pEntry->Type);\r
index 14ff2d9..22c8518 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: genguid.rc,v 1.2 2004/10/16 22:30:17 gvg Exp $ */
+/* $Id$ */
 
 #define REACTOS_STR_FILE_DESCRIPTION   "GUID Generator\0"
 #define REACTOS_STR_INTERNAL_NAME      "genguid\0"
index d730444..34344e8 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 unsigned short table_Windows28591[256] =
-{ 
+{
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009,
     0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013,
     0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D,
index a0a278d..e9a3216 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 unsigned short table_Windows28592[256] =
-{ 
+{
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009,
     0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013,
     0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D,
@@ -23,11 +23,11 @@ unsigned short table_Windows28592[256] =
     0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, 0x00A8, 0x0160,
     0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B, 0x00B0, 0x0105, 0x02DB, 0x0142,
     0x00B4, 0x013E, 0x015B, 0x02C7, 0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD,
-    0x017E, 0x017C, 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, 
-       0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, 0x0110, 0x0143, 
-       0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170, 
-       0x00DC, 0x00DD, 0x0162, 0x00DF, 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 
-       0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, 
-       0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 
+    0x017E, 0x017C, 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
+       0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, 0x0110, 0x0143,
+       0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, 0x0158, 0x016E, 0x00DA, 0x0170,
+       0x00DC, 0x00DD, 0x0162, 0x00DF, 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A,
+       0x0107, 0x00E7, 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F,
+       0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F,
        0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9};
 
index 2012bde..4d44611 100644 (file)
@@ -4,7 +4,7 @@
 
 unsigned short table_OEM437[256] =
 {
-       0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 
+       0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009,
     0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013,
     0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D,
     0x001E, 0x001F, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
@@ -23,13 +23,13 @@ unsigned short table_OEM437[256] =
     0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310,
     0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, 0x2591, 0x2592, 0x2593, 0x2502,
     0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C,
-    0x255B, 0x2510, 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 
-    0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, 0x2568, 0x2564, 
-    0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 
-    0x2584, 0x258C, 0x2590, 0x2580, 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 
-    0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, 
-    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 
+    0x255B, 0x2510, 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F,
+    0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, 0x2568, 0x2564,
+    0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588,
+    0x2584, 0x258C, 0x2590, 0x2580, 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3,
+    0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
+    0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219,
     0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0};
-        
+
 
 
index 272b5e6..cb44614 100644 (file)
@@ -28,5 +28,5 @@ unsigned short table_OEM850[256] =
     0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588,
     0x2584, 0x00A6, 0x00CC, 0x2580, 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5,
     0x00B5, 0x00FE, 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4,
-    0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 
+    0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8,
        0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0};
index caa8b18..7e633e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This is a standalone rc langues to xml parser 
+ * This is a standalone rc langues to xml parser
  * do not use windows or linux specfiy syntax or functions
  * use only pure ansi C, this program is also runing on
  * linux apachie webserver and being use in ReactOS website
@@ -49,9 +49,9 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
   return -4 : Fail get size
   return -5 : Fail size of the file is 0 bytes
   return -6 : Fail malloc memory
-  return -7 : Fail to read the file    
-  return -8 : Fail to write to the file   
-  return -9 : Fail to open write file   
+  return -7 : Fail to read the file
+  return -8 : Fail to write to the file
+  return -9 : Fail to open write file
 */
 
 int main(int argc, char * argv[])
@@ -62,39 +62,39 @@ int main(int argc, char * argv[])
        unsigned char * output_text;
     unsigned char * output_resid;
        unsigned char * output_format;
-       
+
        long buf_size;
        long buf_size_calc = 0;
-       
+
        if (argc!=4)
        {
         printf("Help\n");
                printf("%s inputfile iso-type\n\n",argv[0]);
-               printf("example %s sv.rc 28591 sv.xml\n\n",argv[0]); 
-               printf("Contry table\n");               
-               printf("se (Swedish = Windows-28591 (Latin1 ISO-8859-1)\n"); 
-                
+               printf("example %s sv.rc 28591 sv.xml\n\n",argv[0]);
+               printf("Contry table\n");
+               printf("se (Swedish = Windows-28591 (Latin1 ISO-8859-1)\n");
+
                return -1;
        }
-       
 
-       if ((fp = fopen(argv[1],"rb"))==NULL)   
+
+       if ((fp = fopen(argv[1],"rb"))==NULL)
        {
                printf("Fail open file %s by %s\n",argv[1],argv[0]);
                return -2;
        }
 
 
-  
+
        fseek(fp,0,SEEK_END);
-       if (ferror(fp) !=0) 
+       if (ferror(fp) !=0)
        {
                fclose(fp);
         printf("Fail seek\n");
         return -3;
-       } 
+       }
        buf_size = ftell(fp);
-       if (ferror(fp) !=0) 
+       if (ferror(fp) !=0)
        {
                fclose(fp);
         printf("Fail get size\n");
@@ -102,22 +102,22 @@ int main(int argc, char * argv[])
        }
 
 
-       /* 
-          We make sure it is least 4 times + 2K biger 
-          for we can grow around 2-3 times biger 
+       /*
+          We make sure it is least 4 times + 2K biger
+          for we can grow around 2-3 times biger
           so it better to make safe assume how
           much memory we need
      */
 
        buf_size_calc = (buf_size*4) + 2048;
-    
+
        fseek(fp,0,SEEK_SET);
-       if (ferror(fp) !=0) 
+       if (ferror(fp) !=0)
        {
                fclose(fp);
         printf("Fail seek\n");
         return -3;
-       } 
+       }
 
        if (buf_size==0)
        {
@@ -131,7 +131,7 @@ int main(int argc, char * argv[])
        {
        fclose(fp);
        printf("Fail malloc memory\n");
-       return -6; 
+       return -6;
        }
 
        output_text =(char *)malloc(buf_size_calc);
@@ -140,7 +140,7 @@ int main(int argc, char * argv[])
           free(buffer);
        fclose(fp);
        printf("Fail malloc memory\n");
-       return -6; 
+       return -6;
        }
 
        output_resid =(char *)malloc(buf_size_calc);
@@ -150,7 +150,7 @@ int main(int argc, char * argv[])
        free(output_text);
        fclose(fp);
        printf("Fail malloc memory\n");
-       return -6; 
+       return -6;
        }
 
        output_format =(char *)malloc(buf_size_calc);
@@ -158,15 +158,15 @@ int main(int argc, char * argv[])
        {
           free(buffer);
        free(output_text);
-          free(output_resid);     
+          free(output_resid);
        fclose(fp);
        printf("Fail malloc memory\n");
-       return -6; 
+       return -6;
        }
-               
+
        //fread(buffer,1,buf_size,fp);
        fread(buffer,buf_size,1,fp);
-       if (ferror(fp) !=0) 
+       if (ferror(fp) !=0)
        {
                fclose(fp);
         printf("Fail to read the file\n");
@@ -175,7 +175,7 @@ int main(int argc, char * argv[])
        fclose(fp);
 
        /* Now we can write our parser */
-       
+
        paraser1(buffer, buf_size, output_text, output_resid, output_format,"UTF-8");
        // printf ("%s",output_format);
 
@@ -187,11 +187,11 @@ int main(int argc, char * argv[])
        {
          fwrite(output_resid,1,buf_size_calc,Outfp);
             fclose(Outfp);
-       }       
-       
+       }
+
+
+
 
-       
-               
        if(buffer!=NULL)
      free(buffer);
     if(output_text!=NULL)
@@ -200,14 +200,14 @@ int main(int argc, char * argv[])
      free(output_resid);
     if(output_format!=NULL)
      free(output_format);
-       
 
-       return 0;       
+
+       return 0;
 }
 
 int paraser1(unsigned char *buf, long buf_size,        unsigned char * output_text, unsigned char * output_resid, unsigned char * output_format, unsigned char *iso_type)
 {
-   unsigned char *row; 
+   unsigned char *row;
    long foundPos=0;
    long foundNextPos=0;
    long row_size=0;
@@ -218,7 +218,7 @@ int paraser1(unsigned char *buf, long buf_size,     unsigned char * output_text, uns
    memset(output_format,0,buf_size);
 
    sprintf(output_format,"<?xml version=\"1.0\" encoding=\"%s\"?>\n<resource>\n",iso_type);
-   
+
    row = output_text;
    while(pos < buf_size)
    {
@@ -228,36 +228,36 @@ int paraser1(unsigned char *buf, long buf_size,   unsigned char * output_text, uns
 
          /* create a row string so we can easy scan it */
          find_str('\n',&buf[pos],&foundPos);
-         
+
          if (foundPos !=0)
-         {                  
+         {
                 row_size = foundPos - 1;
 
                 /* found a new row */
-            strncpy(row, &buf[pos], row_size);            
+            strncpy(row, &buf[pos], row_size);
                 pos+=foundPos;
-                if (foundPos >=2) 
-                    row[row_size -1]=0;        
+                if (foundPos >=2)
+                    row[row_size -1]=0;
 
           }
           else
-          {          
+          {
                   row_size = buf_size - pos;
 
                   /* no new row found in the buffer */
-           strncpy(row, &buf[pos], buf_size - pos);               
+           strncpy(row, &buf[pos], buf_size - pos);
                   pos= buf_size;
           }
-       
-          trim(row);              
-          foundPos=0;     
+
+          trim(row);
+          foundPos=0;
 
           /* Detect Basic command and send it to own paraser */
           if (*row==0)
                   continue;
 
-          if (strncmp("/*",row,2)==0) 
-       {                        
+          if (strncmp("/*",row,2)==0)
+       {
                  ParserComment(&pos, buf, buf_size, output_text, output_resid, output_format);
                  continue;
           }
@@ -273,55 +273,55 @@ int paraser1(unsigned char *buf, long buf_size,   unsigned char * output_text, uns
                  continue;
           }
 
-          stringbugs(row,true);        
-                          
+          stringbugs(row,true);
+
           if (foundPos == 0)
           {
                find_str2 ("LANGUAGE ",row,&foundPos,output_resid,output_text);
-            if (foundPos != 0)  
-            {                    
+            if (foundPos != 0)
+            {
                          ParserLang("LANGUAGE", output_resid, output_text, output_format);
                          continue;
                    }
                }
-               
+
                if (foundPos == 0)
                {
                        find_str2 ("STRINGTABLE ",row,&foundPos,output_resid,output_text);
-            if (foundPos != 0)  
-            {                     
+            if (foundPos != 0)
+            {
               ParserCMD3("STRINGTABLE", output_resid, output_text, output_format);
                          ParserString(&pos, buf, buf_size,     output_text, output_resid, output_format);
                          continue;
                    }
                }
-               
+
                if (foundPos == 0)
                {
                        find_str2 (" DIALOGEX ",row,&foundPos,output_resid,output_text);
-            if (foundPos != 0)  
+            if (foundPos != 0)
             {
                          ParserCMD2("DIALOGEX", output_resid, output_text, output_format);
                          ParserDialog("DIALOGEX",&pos, buf, buf_size,  output_text, output_resid, output_format);
                          continue;
                    }
                }
-               
+
                if (foundPos == 0)
                {
                        find_str2 (" DIALOG ",row,&foundPos,output_resid,output_text);
-            if (foundPos != 0)  
+            if (foundPos != 0)
             {
               ParserCMD2("DIALOG", output_resid, output_text, output_format);
                          ParserDialog("DIALOG",&pos, buf, buf_size,    output_text, output_resid, output_format);
                          continue;
                    }
                }
-        
+
                if (foundPos == 0)
                {
                        find_str2 (" ACCELERATORS\0",row,&foundPos,output_resid,output_text);
-            if (foundPos != 0)  
+            if (foundPos != 0)
             {
                          ParserCMD1("ACCELERATORS", output_resid, output_text, output_format);
                          ParserAccelerators(&pos, buf, buf_size,       output_text, output_resid, output_format);
@@ -332,7 +332,7 @@ int paraser1(unsigned char *buf, long buf_size,     unsigned char * output_text, uns
                if (foundPos == 0)
                {
                        find_str2 (" MENU\0",row,&foundPos,output_resid,output_text);
-            if (foundPos != 0)  
+            if (foundPos != 0)
             {
               ParserCMD1("MENU", output_resid, output_text, output_format);
                          ParserMenu("MENU",&pos, buf, buf_size,        output_text, output_resid, output_format);
@@ -340,21 +340,21 @@ int paraser1(unsigned char *buf, long buf_size,   unsigned char * output_text, uns
                    }
                }
 
-               
-   } // end while 
+
+   } // end while
    sprintf(output_format,"%s</resource>\n",output_format);
    return false;
 }
 
 /*
   ParserCMD
-  data  
+  data
   input : IDM_MDIFRAME MENU DISCARDABLE LANG LANG_TAG LANG_TAG
-  input : IDM_MDIFRAME MENU DISCARDABLE 
-  input : IDM_MDIFRAME MENU 
+  input : IDM_MDIFRAME MENU DISCARDABLE
+  input : IDM_MDIFRAME MENU
   input : IDM_MDIFRAME ACCELERATORS DISCARDABLE LANG LANG_TAG LANG_TAG
-  input : IDM_MDIFRAME ACCELERATORS DISCARDABLE 
-  input : IDM_MDIFRAME ACCELERATORS 
+  input : IDM_MDIFRAME ACCELERATORS DISCARDABLE
+  input : IDM_MDIFRAME ACCELERATORS
 
 
   output : <obj type="MENU" rc_name="ID">DISCARDABLE</obj>
@@ -364,7 +364,7 @@ int paraser1(unsigned char *buf, long buf_size,     unsigned char * output_text, uns
   output : <obj type="ACCELERATORS" rc_name="ID">DISCARDABLE</obj>
   output : <obj type="ACCELERATORS" rc_name="ID"></obj>
 
-  param : output_resid = rc_name ID 
+  param : output_resid = rc_name ID
   param : output_text  = MENU DISCARDABLE LANG LANG_TAG LANG_TAG
   param : text  = type example MENU
   param : output_format  = xml data store buffer
@@ -372,11 +372,11 @@ int paraser1(unsigned char *buf, long buf_size,   unsigned char * output_text, uns
 
 void ParserCMD1(unsigned char *text, unsigned char *output_resid, unsigned char *output_text, unsigned char *output_format)
 {
-  long le;  
-  
+  long le;
+
   stringbugs(output_resid,false);
   stringbugs(output_text,false);
-  
+
   le = strlen(text);
 
   if (strlen(output_text) == le)
@@ -384,7 +384,7 @@ void ParserCMD1(unsigned char *text, unsigned char *output_resid, unsigned char
         sprintf(output_format,"%s<group name=\"%s\">\n  <obj type=\"%s\" rc_name=\"%s\"></obj>\n",output_format,text,text,output_resid);
   }
   else if (output_text[le]==' ')
-  {    
+  {
      sprintf(output_format,"%s<group name=\"%s\">\n  <obj type=\"%s\" rc_name=\"%s\">DISCARDABLE</obj>\n",output_format,text,text,output_resid);
   }
 
@@ -392,7 +392,7 @@ void ParserCMD1(unsigned char *text, unsigned char *output_resid, unsigned char
 
 /*
   ParserCMD2
-  data  
+  data
   input : IDM_MDIFRAME DIALOG DISCARDABLE  15, 13, 210, 63 LANG LANG_TAG LANG_TAG
   input : IDM_MDIFRAME DIALOG DISCARDABLE  15, 13, 210, 63
   input : IDM_MDIFRAME DIALOGEX DISCARDABLE  15, 13, 210, 63 LANG LANG_TAG LANG_TAG
@@ -405,23 +405,23 @@ void ParserCMD1(unsigned char *text, unsigned char *output_resid, unsigned char
   output : <obj type="DIALOGEX" rc_name="ID" top="15" left="13" right="210" bottom="63"></obj>
 
 
-  param : output_resid = rc_name ID 
+  param : output_resid = rc_name ID
   param : output_text  =  DIALOG DISCARDABLE  15, 13, 210, 63 LANG LANG_TAG LANG_TAG
   param : text  = type example DIALOG
   param : output_format  = xml data store buffer
-  
+
 */
 
 void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char *output_text, unsigned char *output_format)
 {
        long le;
        long flag = 0;
-       
+
        stringbugs(output_resid,false);
     stringbugs(output_text,false);
 
        le=strlen(text);
-       
+
        sprintf(output_format,"%s<group name=\"%s\">\n  <obj type=\"%s\" rc_name=\"%s\" ",output_format,text,text,output_resid);
 
     find_str2 (" DISCARDABLE ",output_text,&flag,output_resid,output_text);
@@ -432,7 +432,7 @@ void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char
                *output_resid='\0'; /* not in use futer */
                flag=0; /*      DISCARDABLE off */
                sprintf(output_text,"%s",&output_text[le]);
-               trim(output_text);              
+               trim(output_text);
        }
        else
        {
@@ -441,11 +441,11 @@ void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char
                sprintf(output_text,"%s",&output_text[11]);
                trim(output_text);
        }
-       
+
    /* data is looking like this 0 1 2 3 now */
-        
+
    trim(output_resid);
-   trim(output_text);  
+   trim(output_text);
    find_str2 (" ",output_text,&flag,output_resid,output_text);
    trim(output_resid);
    trim(output_text);
@@ -453,7 +453,7 @@ void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char
    sprintf(output_format,"%sleft=\"%s\" ",output_format,output_resid);
 
    trim(output_resid);
-   trim(output_text);  
+   trim(output_text);
    find_str2 (" ",output_text,&flag,output_resid,output_text);
    trim(output_resid);
    trim(output_text);
@@ -461,7 +461,7 @@ void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char
    sprintf(output_format,"%stop=\"%s\" ",output_format,output_resid);
 
    trim(output_resid);
-   trim(output_text);  
+   trim(output_text);
    find_str2 (" ",output_text,&flag,output_resid,output_text);
    trim(output_resid);
    trim(output_text);
@@ -474,11 +474,11 @@ void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char
 
 /*
   ParserCMD3
-  data  
+  data
   input : STRINGTABLE DISCARDABLE LANG LANG_TAG LANG_TAG
-  input : STRINGTABLE DISCARDABLE LANG 
+  input : STRINGTABLE DISCARDABLE LANG
   input : STRINGTABLE LANG LANG_TAG LANG_TAG
-  input : STRINGTABLE 
+  input : STRINGTABLE
 
 
   output : <obj type="STRINGTABLE">DISCARDABLE</obj>
@@ -491,10 +491,10 @@ void ParserCMD2(unsigned char *text, unsigned char *output_resid, unsigned char
   param : output_text  =  DIALOG DISCARDABLE  15, 13, 210, 63 LANG LANG_TAG LANG_TAG
   param : text  = type example DIALOG
   param : output_format  = xml data store buffer
-  
+
 */
 void ParserCMD3(unsigned char *text, unsigned char *output_resid, unsigned char *output_text, unsigned char *output_format)
-{  
+{
   long foundPos=0;
 
   stringbugs(output_resid,false);
@@ -512,7 +512,7 @@ void ParserCMD3(unsigned char *text, unsigned char *output_resid, unsigned char
 }
 /*
   ParserLang
-  data  
+  data
   input : LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
   input : LANGUAGE LANG_ENGLISH SUBLANG_ENGLISH_US
   output : <obj type="LANG" sublang="sub">lang</obj>
@@ -527,13 +527,13 @@ void ParserCMD3(unsigned char *text, unsigned char *output_resid, unsigned char
 void ParserLang(unsigned char *text, unsigned char *output_resid, unsigned char *output_text, unsigned char *output_format)
 {
   long foundPos=0;
-    
+
   stringbugs(output_resid,false);
-  stringbugs(output_text,false);       
-  
+  stringbugs(output_text,false);
+
   sprintf(output_text,"%s",&output_text[strlen(text)+1]);
 
-  /* split the lang into two string */ 
+  /* split the lang into two string */
   find_str2 (" ",output_text,&foundPos,output_resid,output_text);
   trim(output_resid);
   trim(output_text);
@@ -543,11 +543,11 @@ void ParserLang(unsigned char *text, unsigned char *output_resid, unsigned char
 
 /*
   ParserComment
-  data  
-  input : / *  sadasdas asdasd  asdas ... * /  
+  data
+  input : / *  sadasdas asdasd  asdas ... * /
   output :<obj type=\"COMMENT\"><![CDATA[ sadasdas asdasd  asdas ... ]]></obj>
 
-  input : / *  sadasdas asdasd  asdas ... * /  
+  input : / *  sadasdas asdasd  asdas ... * /
   output :<obj type=\"COMMENT\"><![CDATA[ sadasdas asdasd  asdas ... ]]></obj>
 
   input : #if x
@@ -555,8 +555,8 @@ void ParserLang(unsigned char *text, unsigned char *output_resid, unsigned char
 
   input : // hi
   output :<obj type=\"COMMENT\"><![CDATA[// hi]]></obj>
-  
-  param : pos = current buf position 
+
+  param : pos = current buf position
   param : buf = read in buffer from file rc
   param : buf_size  = buf max size
   param : output_text  = using internal instead alloc more memory
@@ -570,16 +570,16 @@ void ParserComment(long *pos, unsigned char *buf, long buf_size, unsigned char *
   long foundNextPos=0;
   long row_size=0;
   unsigned char *row = output_text;
-  
+
 
   row_size = strlen(row);
   if (strncmp("//",&row[0],2)==0)
-  {               
+  {
        sprintf(output_format,"%s<group name=\"COMMENT\">\n  <obj type=\"COMMENT\"><![CDATA[%s]]></obj>\n</group>\n",output_format,row);
        return;
-  }       
+  }
   if (strncmp("#",&row[0],1)==0)
-  {   
+  {
        sprintf(output_format,"%s<group name=\"COMMENT\">\n  <obj type=\"COMMENT\"><![CDATA[%s]]></obj>\n</group>\n",output_format,row);
        return;
   }
@@ -593,43 +593,43 @@ void ParserComment(long *pos, unsigned char *buf, long buf_size, unsigned char *
            row[foundNextPos+2]='\0';
            sprintf(output_format,"%s<group name=\"COMMENT\">\n  <obj type=\"COMMENT\"><![CDATA[%s]]></obj>\n</group>\n",output_format,row);
            return;
-       }       
-         
+       }
+
   }
-  
+
 
   sprintf(output_format,"%s<group name=\"COMMENT\">\n  <obj type=\"COMMENT\"><![CDATA[%s\n",output_format,output_text);
 
  while(*pos < buf_size)
   {
-         foundPos=0;     
+         foundPos=0;
       row_size=0;
 
          /* create a row string so we can easy scan it */
-         find_str('\n',&buf[*pos],&foundPos);    
+         find_str('\n',&buf[*pos],&foundPos);
          if (foundPos !=0)
-         {                  
+         {
                 row_size = foundPos - 1;
 
                 /* found a new row */
-            strncpy(row, &buf[*pos], foundPos);                   
+            strncpy(row, &buf[*pos], foundPos);
                 *pos+=foundPos;
-                if (foundPos >=2) 
+                if (foundPos >=2)
                 {
-                    row[row_size -1]=0;                                
+                    row[row_size -1]=0;
                 }
 
           }
           else
-          {          
+          {
                   row_size = buf_size - *pos;
 
                   /* no new row found in the buffer */
-           strncpy(row, &buf[*pos], buf_size - *pos);             
+           strncpy(row, &buf[*pos], buf_size - *pos);
                   *pos= buf_size;
-         }     
+         }
 
-       /* Search now after end of comment */              
+       /* Search now after end of comment */
           row_size=strlen(row);
           for (foundNextPos=0;foundNextPos<row_size;foundNextPos++)
           {
@@ -640,8 +640,8 @@ void ParserComment(long *pos, unsigned char *buf, long buf_size, unsigned char *
                 row[foundNextPos+2]='\0';
                                sprintf(output_format,"%s%s]]></obj>\n</group>\n",output_format,row);
                                return;
-                       }          
-          }                            
+                       }
+          }
           sprintf(output_format,"%s%s\n",output_format,row);
     }
 
@@ -649,16 +649,16 @@ void ParserComment(long *pos, unsigned char *buf, long buf_size, unsigned char *
 
 /*
   ParserAccelerators
-  data    
+  data
   input  : BEGIN
   input  : "^A", CMD_SELECT_ALL
   input  : END
 
-  output : <obj type="ACCELERATORS" command="BEGIN" /> 
+  output : <obj type="ACCELERATORS" command="BEGIN" />
   output : <obj type="ACCELERATORS" rc_name="CMD_SEARCH"><![CDATA[^F]]></obj>
   output : <obj type="ACCELERATORS" command="END" />
-  
-  param : pos = current buf position 
+
+  param : pos = current buf position
   param : buf = read in buffer from file rc
   param : buf_size  = buf max size
   param : output_text  = using internal instead alloc more memory
@@ -676,45 +676,45 @@ void ParserAccelerators(long *pos, unsigned char *buf, long buf_size, unsigned c
 
   while(*pos < buf_size)
   {
-         foundPos=0;     
+         foundPos=0;
       row_size=0;
 
          /* create a row string so we can easy scan it */
-         find_str('\n',&buf[*pos],&foundPos);    
+         find_str('\n',&buf[*pos],&foundPos);
          if (foundPos !=0)
-         {                  
+         {
                 row_size = foundPos - 1;
 
                 /* found a new row */
-            strncpy(row, &buf[*pos], foundPos);                   
+            strncpy(row, &buf[*pos], foundPos);
                 *pos+=foundPos;
-                if (foundPos >=2) 
+                if (foundPos >=2)
                 {
-                    row[row_size -1]=0;                                
+                    row[row_size -1]=0;
                 }
 
           }
           else
-          {          
+          {
                   row_size = buf_size - *pos;
 
                   /* no new row found in the buffer */
-           strncpy(row, &buf[*pos], buf_size - *pos);             
+           strncpy(row, &buf[*pos], buf_size - *pos);
                   *pos= buf_size;
-         }        
+         }
 
-         stringbugs(row,true);   
+         stringbugs(row,true);
       if (start == false)
          {
                if ((strcmp(row,"BEGIN")==0) || (strcmp(row,"{")==0))
                {
                   start=true;
                   sprintf(output_format,"%s  <obj type=\"ACCELERATORS\" command=\"BEGIN\" />\n",output_format);
-                  
+
            }
                continue;
          }
-                         
+
          if ((strcmp(row,"END")==0) || (strcmp(row,"}")==0))
          {
                  sprintf(output_format,"%s  <obj type=\"ACCELERATORS\" command=\"END\" />\n</group>\n",output_format);
@@ -729,12 +729,12 @@ void ParserAccelerators(long *pos, unsigned char *buf, long buf_size, unsigned c
       find_str('"',&row[foundPos],&foundNextPos);
 
          if ((foundPos!=0) && (foundNextPos!=0))
-         {           
-            
-         sprintf(output_format,"%s  <obj type=\"KEY\" rc_name=\"",output_format); 
+         {
+
+         sprintf(output_format,"%s  <obj type=\"KEY\" rc_name=\"",output_format);
                 le = strlen(output_format);
-                sprintf(output_format,"%s%s",output_format,&row[foundNextPos+foundPos]); 
-         trim(&output_format[le]); 
+                sprintf(output_format,"%s%s",output_format,&row[foundNextPos+foundPos]);
+         trim(&output_format[le]);
                 row[foundNextPos+foundPos]='\0';
                 row[foundPos-1]=' ';
                 foundPos=0;
@@ -743,25 +743,25 @@ void ParserAccelerators(long *pos, unsigned char *buf, long buf_size, unsigned c
                 {
                         row[foundPos-1]=' ';
                 }
-                        
+
                 trim(row);
-                sprintf(output_format,"%s\"><![CDATA[%s]]></obj>\n",output_format,row); 
-         }       
+                sprintf(output_format,"%s\"><![CDATA[%s]]></obj>\n",output_format,row);
+         }
   }
 }
 
 /*
   ParserString
-  data    
+  data
   input  : BEGIN
-  input  : IDS_HINT_BLANK  "text"  
+  input  : IDS_HINT_BLANK  "text"
   input  : END
 
-  output : <obj type="STRINGTABLE" command="BEGIN" /> 
+  output : <obj type="STRINGTABLE" command="BEGIN" />
   output : <obj type="STRING" rc_name="rc_id">text</obj>
   output : <obj type="STRINGTABLE" command="END" />
-  
-  param : pos = current buf position 
+
+  param : pos = current buf position
   param : buf = read in buffer from file rc
   param : buf_size  = buf max size
   param : output_text  = using internal instead alloc more memory
@@ -770,7 +770,7 @@ void ParserAccelerators(long *pos, unsigned char *buf, long buf_size, unsigned c
 */
 void ParserString(long *pos, unsigned char *buf, long buf_size,        unsigned char * output_text, unsigned char * output_resid, unsigned char * output_format)
 {
-  long foundPos=0;  
+  long foundPos=0;
   long row_size=0;
   unsigned char *row = output_text;
   int start=false;
@@ -781,44 +781,44 @@ void ParserString(long *pos, unsigned char *buf, long buf_size,   unsigned char *
          row_size=0;
 
                  /* create a row string so we can easy scan it */
-         find_str('\n',&buf[*pos],&foundPos);  
-       
+         find_str('\n',&buf[*pos],&foundPos);
+
          if (foundPos !=0)
-         {                  
+         {
                 row_size = foundPos - 1;
 
                 /* found a new row */
-            strncpy(row, &buf[*pos], foundPos);                   
+            strncpy(row, &buf[*pos], foundPos);
                 *pos+=foundPos;
-                if (foundPos >=2) 
+                if (foundPos >=2)
                 {
-                    row[row_size -1]=0;                                
+                    row[row_size -1]=0;
                 }
 
           }
           else
-          {          
+          {
                   row_size = buf_size - *pos;
 
                   /* no new row found in the buffer */
-           strncpy(row, &buf[*pos], buf_size - *pos);             
+           strncpy(row, &buf[*pos], buf_size - *pos);
                   *pos= buf_size;
-         }        
-  
-      stringbugs(row,true);    
+         }
+
+      stringbugs(row,true);
+
 
-        
          if (start == false)
          {
                if ((strcmp(row,"BEGIN")==0) || (strcmp(row,"{")==0))
                {
-                       
+
                        start=true;
-                       sprintf(output_format,"%s  <obj type=\"STRINGTABLE\" command=\"BEGIN\" />\n",output_format);             
+                       sprintf(output_format,"%s  <obj type=\"STRINGTABLE\" command=\"BEGIN\" />\n",output_format);
                }
                        continue;
          }
-        
+
          if ((strcmp(row,"END")==0) || (strcmp(row,"}")==0))
          {
                        sprintf(output_format,"%s  <obj type=\"STRINGTABLE\" command=\"END\" />\n</group>\n",output_format);
@@ -827,17 +827,17 @@ void ParserString(long *pos, unsigned char *buf, long buf_size,   unsigned char *
                        break;
          }
 
-        
+
 
          /* the split code here */
-      foundPos=0;                 
+      foundPos=0;
          find_str2 (" ",row,&foundPos,output_resid,output_text);
-         
-         if (foundPos != 0)  
-      {                                  
+
+         if (foundPos != 0)
+      {
                  trim(output_text);
-                 trim(output_resid);                     
-                   
+                 trim(output_resid);
+
                  if (*output_resid!='\0')
               sprintf(output_format,"%s  <obj type=\"STRING\" rc_name=\"%s\"><![CDATA[%s]]></obj>\n",output_format,output_resid,output_text);
           else
@@ -849,8 +849,8 @@ void ParserString(long *pos, unsigned char *buf, long buf_size,     unsigned char *
 
 /*
   ParserDialog
-  data    
-  
+  data
+
   input  : BEGIN
   output : <obj type="DIALOG" command="BEGIN" />
   output : <obj type="DIALOGEX" command="BEGIN" />
@@ -867,16 +867,16 @@ void ParserString(long *pos, unsigned char *buf, long buf_size,   unsigned char *
   output : <obj type="END" command="BEGIN" />
   output : <obj type="END" command="BEGIN" />
 
-  input  : FONT 8, "MS Shell Dlg"  
+  input  : FONT 8, "MS Shell Dlg"
   output : <obj type="FONT" size="8" name="MS Shell Dlg"></obj>
 
   input  : FONT 8, "MS Shell Dlg", 0, 0, 0x1
   output : <obj type="FONT" size="8" name="MS Shell Dlg">0  0  0x1</obj>
-  
-  input  : CONTROL         "",101,"Static",SS_SIMPLE | SS_NOPREFIX,3,6,150,10  
+
+  input  : CONTROL         "",101,"Static",SS_SIMPLE | SS_NOPREFIX,3,6,150,10
   output : <obj type="CONTROL" rc_name="IDC_ICON_ALIGN_1" prop="Button" style="BS_OWNERDRAW |BS_BOTTOM | WS_TABSTOP" top="57" left="25" right="46" bottom="44"><![CDATA[left/top right]]></obj>
 
-   
+
   Builder1
   input  : DEFPUSHBUTTON   "&OK",1,158,6,47,14 xx
   input  : PUSHBUTTON      "&Cancel",2,158,23,47,14 xx
@@ -884,7 +884,7 @@ void ParserString(long *pos, unsigned char *buf, long buf_size,     unsigned char *
   input  : GROUPBOX        "&Display Mode",IDC_LABEL4,7,96,157,28 xx
   input  : ICON            "",IDC_PICTURE,173,101,21,20 xx
 
-  input  : EDITTEXT        201,3,29,134,12,ES_AUTOHSCROLL  
+  input  : EDITTEXT        201,3,29,134,12,ES_AUTOHSCROLL
   input  : LISTBOX         IDC_LIST, 4, 16, 104, 46, WS_TABSTOP
   input  : COMBOBOX        ID_EOLN,54,18,156,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
 
@@ -893,15 +893,15 @@ void ParserString(long *pos, unsigned char *buf, long buf_size,   unsigned char *
 
   output : <obj type="GROUPBOX" rc_name="IDC_LABEL4" top="7" left="96" right="157" bottom="28" style="CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP"><![CDATA[&Display Mode]]></obj>
   output : <obj type="GROUPBOX" rc_name="IDC_LABEL4" top="7" left="96" right="157" bottom="28"><![CDATA[&Display Mode]]></obj>
-    
+
   builder2
-  input  : CAPTION "Execute"     
+  input  : CAPTION "Execute"
   input  : EXSTYLE WS_EX_APPWINDOW
   input  : STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
 
   output : <obj type="STYLE">DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU</obj>
 
-  param : pos = current buf position 
+  param : pos = current buf position
   param : buf = read in buffer from file rc
   param : buf_size  = buf max size
   param : output_text  = using internal instead alloc more memory
@@ -913,7 +913,7 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
   long foundPos=0;
   long foundNextPos=0;
   long row_size=0;
-  unsigned char *row = output_text; 
+  unsigned char *row = output_text;
   long commandfound=0;
   long le;
 
@@ -922,36 +922,36 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
 
   while(*pos < buf_size)
   {
-         foundPos=0;     
+         foundPos=0;
       row_size=0;
 
          /* create a row string so we can easy scan it */
-         find_str('\n',&buf[*pos],&foundPos);    
+         find_str('\n',&buf[*pos],&foundPos);
          if (foundPos !=0)
-         {                  
+         {
                 row_size = foundPos - 1;
 
                 /* found a new row */
-            strncpy(row, &buf[*pos], foundPos);                   
+            strncpy(row, &buf[*pos], foundPos);
                 *pos+=foundPos;
-                if (foundPos >=2) 
+                if (foundPos >=2)
                 {
-                    row[row_size -1]=0;                                
+                    row[row_size -1]=0;
                 }
 
           }
           else
-          {          
+          {
                   row_size = buf_size - *pos;
 
                   /* no new row found in the buffer */
-           strncpy(row, &buf[*pos], buf_size - *pos);             
+           strncpy(row, &buf[*pos], buf_size - *pos);
                   *pos= buf_size;
-         }        
+         }
 
          //stringbugs(row,true);
          trim(row);
-     
+
          if ((strcmp(row,"BEGIN")==0) || (strcmp(row,"{")==0))
             commandfound=1;
          if ((strcmp(row,"END")==0) || (strcmp(row,"}")==0))
@@ -979,15 +979,15 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
             commandfound=3;
          if (strncmp("EXSTYLE ",row,8)==0)
             commandfound=3;
-         if (strncmp(row,"LISTBOX ",8)==0)               
+         if (strncmp(row,"LISTBOX ",8)==0)
          commandfound=3;
-         if (strncmp(row,"COMBOBOX ",9)==0)              
+         if (strncmp(row,"COMBOBOX ",9)==0)
          commandfound=3;
 
       if ((*output_resid!=0) && (commandfound!=0))
          {
                  /* Builder 1*/
-          if (strncmp(output_resid,"LTEXT ",6)==0)               
+          if (strncmp(output_resid,"LTEXT ",6)==0)
              DialogCMDBuild1(output_resid, output_format, 5, "LTEXT");
           if (strncmp(output_resid,"GROUPBOX ",9)==0)
               DialogCMDBuild1(output_resid, output_format, 8, "GROUPBOX");
@@ -1003,7 +1003,7 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
                          DialogCMDBuild1(output_resid, output_format, 7, "LISTBOX");
                  if (strncmp("COMBOBOX ",output_resid,9)==0)
                          DialogCMDBuild1(output_resid, output_format, 8, "COMBOBOX");
-          
+
                  /* Builder 2*/
                  if (strncmp("STYLE ",output_resid,6)==0)
                      DialogCMDBuild2(output_resid, output_format, 5, "STYLE");
@@ -1015,7 +1015,7 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
                          DialogCMDBuild3(output_resid, output_format, 7, "CONTROL");
 
                  /* no builder */
-                 if (strncmp(output_resid,"FONT ",5)==0) 
+                 if (strncmp(output_resid,"FONT ",5)==0)
                  {
              stringbugs(output_resid,true);
                         /* FONT */
@@ -1024,21 +1024,21 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
                         sprintf(output_format,"%s  <obj type=\"FONT\" size=\"",output_format);
                         le = strlen(output_format);
              sprintf(output_format,"%s%s",output_format,output_resid);
-             
+
                         foundPos=0;
-                        find_str('\"',output_resid,&foundPos);                  
+                        find_str('\"',output_resid,&foundPos);
                         output_format[le+foundPos-1]='\0';
                         trim(&output_format[le]);
                         sprintf(output_format,"%s\" name=",output_format);
              le = strlen(output_format);
                         sprintf(output_format,"%s%s",output_format,&output_resid[foundPos-1]);
-             
+
                         foundNextPos=0;
                         find_str('\"',&output_resid[foundPos],&foundNextPos);
                         output_format[le+foundPos+foundNextPos-1]='\0';
                         trim(&output_format[le+foundPos]);
                         if (output_resid[foundPos+foundNextPos]=='\0')
-                        {                                
+                        {
                                sprintf(output_format,"%s></obj>\n",output_format);
                         }
                         else
@@ -1051,7 +1051,7 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
 
            *output_resid='\0';
          }
-                        
+
          if (commandfound==1)
          {
                  sprintf(output_format,"%s  <obj type=\"%s\" command=\"BEGIN\" />\n",output_format,text);
@@ -1063,15 +1063,15 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
          }
 
          sprintf(output_resid,"%s%s",output_resid,row);
-         commandfound=0;      
+         commandfound=0;
   }
 
 }
 //////////////////////////
 /*
   ParserDialog
-  data    
-  
+  data
+
   input  : BEGIN
   output : <obj type="DIALOG" command="BEGIN" />
   output : <obj type="DIALOGEX" command="BEGIN" />
@@ -1087,8 +1087,8 @@ void ParserDialog(unsigned char *text, long *pos, unsigned char *buf, long buf_s
   input  : }
   output : <obj type="END" command="BEGIN" />
   output : <obj type="END" command="BEGIN" />
-  param : pos = current buf position 
+
+  param : pos = current buf position
   param : buf = read in buffer from file rc
   param : buf_size  = buf max size
   param : output_text  = using internal instead alloc more memory
@@ -1100,7 +1100,7 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
   long foundPos=0;
   long foundNextPos=0;
   long row_size=0;
-  unsigned char *row = output_text; 
+  unsigned char *row = output_text;
   long commandfound=0;
   long le;
   long count=0;
@@ -1110,36 +1110,36 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
 
   while(*pos < buf_size)
   {
-         foundPos=0;     
+         foundPos=0;
       row_size=0;
 
          /* create a row string so we can easy scan it */
-         find_str('\n',&buf[*pos],&foundPos);    
+         find_str('\n',&buf[*pos],&foundPos);
          if (foundPos !=0)
-         {                  
+         {
                 row_size = foundPos - 1;
 
                 /* found a new row */
-            strncpy(row, &buf[*pos], foundPos);                   
+            strncpy(row, &buf[*pos], foundPos);
                 *pos+=foundPos;
-                if (foundPos >=2) 
+                if (foundPos >=2)
                 {
-                    row[row_size -1]=0;                                
+                    row[row_size -1]=0;
                 }
 
           }
           else
-          {          
+          {
                   row_size = buf_size - *pos;
 
                   /* no new row found in the buffer */
-           strncpy(row, &buf[*pos], buf_size - *pos);             
+           strncpy(row, &buf[*pos], buf_size - *pos);
                   *pos= buf_size;
-         }        
+         }
 
          //stringbugs(row,true);
          stringbugs2(row,true);
-     
+
          if ((strcmp(row,"BEGIN")==0) || (strcmp(row,"{")==0))
             commandfound=1;
          if ((strcmp(row,"END")==0) || (strcmp(row,"}")==0))
@@ -1149,25 +1149,25 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
             commandfound=3;
          if (strncmp("MENUITEM ",row,8)==0)
             commandfound=3;
-        
+
 
       if ((*output_resid!=0) && (commandfound!=0))
-         {                
-          if (strncmp(output_resid,"POPUP ",6)==0)               
+         {
+          if (strncmp(output_resid,"POPUP ",6)==0)
                  {
-                        sprintf(output_resid,"%s",&output_resid[5]);   
-             trim(output_resid);                        
-                        sprintf(output_format,"%s<obj type=\"POPUP\"><![CDATA[%s]]></obj>\n",output_format,output_resid);   
-             *output_resid='\0'; 
+                        sprintf(output_resid,"%s",&output_resid[5]);
+             trim(output_resid);
+                        sprintf(output_format,"%s<obj type=\"POPUP\"><![CDATA[%s]]></obj>\n",output_format,output_resid);
+             *output_resid='\0';
                  }
 
                  if (strncmp(output_resid,"MENUITEM ",9)==0)
                  {
-              sprintf(output_resid,"%s",&output_resid[8]);                       
+              sprintf(output_resid,"%s",&output_resid[8]);
                          trim(output_resid);
                          if (strcmp(output_resid,"SEPARATOR")==0)
                          {
-                                sprintf(output_format,"%s<obj type=\"MENUITEMSEPERATOR\"></obj>\n",output_format);   
+                                sprintf(output_format,"%s<obj type=\"MENUITEMSEPERATOR\"></obj>\n",output_format);
                                 *output_resid='\0';
                          }
                          else
@@ -1176,34 +1176,34 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
                                  foundNextPos=0;
                                  find_str('"',output_resid,&foundPos);
                                  find_str('"',&output_resid[foundPos],&foundNextPos);
-                  
+
                                  stringbugs(&output_resid[foundPos+foundNextPos],true);
 
                                  if ((foundPos+foundNextPos)==0)
                                  {
-                                        sprintf(output_format,"%s<obj type=\"MENUITEM\" rc_name=\"%s\"></obj>\n",output_format,&output_resid[foundPos+foundNextPos]);   
+                                        sprintf(output_format,"%s<obj type=\"MENUITEM\" rc_name=\"%s\"></obj>\n",output_format,&output_resid[foundPos+foundNextPos]);
                                  }
                                  else
                                  {
-                                   sprintf(output_format,"%s<obj type=\"MENUITEM\" rc_name=\"%s\">",output_format,&output_resid[foundPos+foundNextPos]);   
-                                       
+                                   sprintf(output_format,"%s<obj type=\"MENUITEM\" rc_name=\"%s\">",output_format,&output_resid[foundPos+foundNextPos]);
+
                                        output_resid[foundPos+foundNextPos]='\0';
                                        trim(output_resid);
-                                                                  
-                    sprintf(output_format,"%s<![CDATA[%s]]></obj>\n",output_format,output_resid);    
+
+                    sprintf(output_format,"%s<![CDATA[%s]]></obj>\n",output_format,output_resid);
                                  }
-                   
+
 
 
                  *output_resid='\0';
                          }
                  }
 
-      
-                
+
+
            *output_resid='\0';
          }
-                        
+
          if (commandfound==1)
          {
                  count++;
@@ -1223,7 +1223,7 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
                      sprintf(output_format,"%s<obj type=\"%s\" command=\"END\" />\n",output_format,text);
                  else
                          sprintf(output_format,"%s<obj type=\"POPUP\" command=\"END\" />\n",output_format);
-                 
+
                  if (count<1)
                  {
                          sprintf(output_format,"%s</group>\n",output_format);
@@ -1232,7 +1232,7 @@ void ParserMenu(unsigned char *text, long *pos, unsigned char *buf, long buf_siz
          }
 
          sprintf(output_resid,"%s%s",output_resid,row);
-         commandfound=0;      
+         commandfound=0;
   }
 
 }
@@ -1242,12 +1242,12 @@ void stringbugs(unsigned char *buf, int shift2)
   long foundPos=0;
   long foundNextPos=0;
   long t=0;
-                 
+
   /* remove , */
   if (shift2== false)
   {
        for (t=0;t<strlen(buf);t++)
-       {  
+       {
          if (foundPos==0)
          {
             if (strncmp(",",&buf[t],1)==0)
@@ -1258,8 +1258,8 @@ void stringbugs(unsigned char *buf, int shift2)
             if (strncmp("\"",&buf[t],1)==0)
             {
                     buf[t]=' ';
-            }    
-         
+            }
+
             if (strncmp("/*",&buf[t],2)==0)
             {
                      foundPos=t;
@@ -1279,14 +1279,14 @@ void stringbugs(unsigned char *buf, int shift2)
                 {
            buf[t]=' ';
                 }
-         }              
+         }
        }
   }
   else
   {
     /* shift */
        for (t=0;t<strlen(buf);t++)
-       {  
+       {
          if ((foundPos==0) && (foundNextPos==0))
          {
             if (strncmp(",",&buf[t],1)==0)
@@ -1296,9 +1296,9 @@ void stringbugs(unsigned char *buf, int shift2)
 
             if (strncmp("\"",&buf[t],1)==0)
             {
-                   foundNextPos=t; 
-            }    
-         
+                   foundNextPos=t;
+            }
+
             if (strncmp("/*",&buf[t],2)==0)
             {
                      foundPos=t;
@@ -1324,16 +1324,16 @@ void stringbugs(unsigned char *buf, int shift2)
                 if (foundNextPos!=0)
                 {
                        if (strncmp("\"",&buf[t],1)==0)
-                       {                               
+                       {
                                foundNextPos=0;
-                       }                       
+                       }
                 }
          }
        }
   }
 
   trim(buf);
-  /* have remove all wrong syntax */   
+  /* have remove all wrong syntax */
 }
 
 void stringbugs2(unsigned char *buf, int shift2)
@@ -1341,20 +1341,20 @@ void stringbugs2(unsigned char *buf, int shift2)
   long foundPos=0;
   long foundNextPos=0;
   long t=0;
-                 
+
   /* remove , */
   if (shift2== false)
   {
        for (t=0;t<strlen(buf);t++)
-       {  
+       {
          if (foundPos==0)
          {
 
             if (strncmp("\"",&buf[t],1)==0)
             {
                     buf[t]=' ';
-            }    
-         
+            }
+
             if (strncmp("/*",&buf[t],2)==0)
             {
                      foundPos=t;
@@ -1374,22 +1374,22 @@ void stringbugs2(unsigned char *buf, int shift2)
                 {
            buf[t]=' ';
                 }
-         }              
+         }
        }
   }
   else
   {
     /* shift */
        for (t=0;t<strlen(buf);t++)
-       {  
+       {
          if ((foundPos==0) && (foundNextPos==0))
          {
 
             if (strncmp("\"",&buf[t],1)==0)
             {
-                   foundNextPos=t; 
-            }    
-         
+                   foundNextPos=t;
+            }
+
             if (strncmp("/*",&buf[t],2)==0)
             {
                      foundPos=t;
@@ -1415,16 +1415,16 @@ void stringbugs2(unsigned char *buf, int shift2)
                 if (foundNextPos!=0)
                 {
                        if (strncmp("\"",&buf[t],1)==0)
-                       {                               
+                       {
                                foundNextPos=0;
-                       }                       
+                       }
                 }
          }
        }
   }
 
   trim(buf);
-  /* have remove all wrong syntax */   
+  /* have remove all wrong syntax */
 }
 
 
@@ -1432,22 +1432,22 @@ void stringbugs2(unsigned char *buf, int shift2)
 void trim(unsigned char* buf)
 {
   size_t le;
-  
+
   if (buf==NULL)
          return;
   if (*buf==0)
          return;
 
   le=strlen(buf);
-  
-  
+
+
   while(le>0)
   {
-    
+
     if (isspace(buf[le-1])!=0)
-       {       
+       {
                buf[le-1]=0;
-        le=strlen(buf); 
+        le=strlen(buf);
        }
        else
        {
@@ -1462,7 +1462,7 @@ void trim(unsigned char* buf)
        {
                strncpy(&buf[0],&buf[1],le-1);
                buf[le-1]=0;
-        le=strlen(buf); 
+        le=strlen(buf);
        }
        else
        {
@@ -1473,30 +1473,30 @@ void trim(unsigned char* buf)
 void find_str(unsigned char asc,unsigned char *buf, long *foundPos)
 {
   int t;
-  size_t le;  
+  size_t le;
 
   le=strlen(buf);
 
    for (t=0;t<le;t++)
    {
-                if (buf[t]==asc) 
-                {               
+                if (buf[t]==asc)
+                {
                        *foundPos =  *foundPos+t+1;
                        break ;
                 }
   }
 
   /* for end of line the \ is a special case */
-  if ((asc == '\n') && (foundPos!=0) && (buf[t-2]=='\\')) 
-  {             
+  if ((asc == '\n') && (foundPos!=0) && (buf[t-2]=='\\'))
+  {
      long extra=t+1;
 
-     find_str(asc, &buf[extra], foundPos);         
+     find_str(asc, &buf[extra], foundPos);
   }
 
 }
 
-void find_str2(unsigned char *asc, unsigned char *buf, long *foundPos, 
+void find_str2(unsigned char *asc, unsigned char *buf, long *foundPos,
                           unsigned char * output_resid, unsigned char *output_text)
 {
   int t=0;
@@ -1513,19 +1513,19 @@ void find_str2(unsigned char *asc, unsigned char *buf, long *foundPos,
 
    for (t=0;t<le;t++)
    {
-                if (strncmp(&buf[t],asc,lec)==0) 
-                {               
+                if (strncmp(&buf[t],asc,lec)==0)
+                {
                    long softfoundPos=0;
-                       
+
                         *foundPos =  *foundPos+t+lec;
                         softfoundPos = *foundPos;
-                                               
+
                         strncpy(output_resid, &buf[0], t);
                         output_resid[t]=0;
-                   
+
                         strncpy(output_text, &buf[t], le-t);
                         output_text[ le-t ]=0;
-                       
+
                        break ;
                 }
   }
@@ -1534,37 +1534,37 @@ void find_str2(unsigned char *asc, unsigned char *buf, long *foundPos,
 
 void DialogCMDBuild1(unsigned char *output_resid, unsigned char *output_format, long pos, unsigned char * text)
 {
-  
+
+
   unsigned char extra[1000];
   long foundPos=0;
   long foundNextPos=0;
   long le;
   long size;
+
   stringbugs(output_resid,true);
   sprintf(output_resid,"%s",&output_resid[pos]);
   trim(output_resid);
+
   find_str('"',output_resid,&foundPos);
   find_str('"',&output_resid[foundPos],&foundNextPos);
+
   if ((foundPos!=0) && (foundPos!=0))
   {
       strcpy(extra,&output_resid[foundPos+foundNextPos]);
       trim(extra);
-  
-      output_resid[foundPos+foundNextPos]='\0';        
+
+      output_resid[foundPos+foundNextPos]='\0';
       trim(output_resid);
   }
   else
-  {      
+  {
          strcpy(extra,output_resid);
-         *output_resid='\0';  
+         *output_resid='\0';
   }
   // \0
-  sprintf(output_format,"%s  <obj type=\"%s\" rc_name=\"%s",output_format,text,extra);  
-  foundPos=0;  
+  sprintf(output_format,"%s  <obj type=\"%s\" rc_name=\"%s",output_format,text,extra);
+  foundPos=0;
   find_str(' ',extra,&foundPos);
   le = (strlen(output_format) - strlen(extra))+foundPos-1;
   output_format[le]='\0';
@@ -1573,8 +1573,8 @@ void DialogCMDBuild1(unsigned char *output_resid, unsigned char *output_format,
 
   /* top */
   // \0
-  sprintf(output_format,"%s\" left=\"%s",output_format,extra);  
-  foundPos=0;  
+  sprintf(output_format,"%s\" left=\"%s",output_format,extra);
+  foundPos=0;
   find_str(' ',extra,&foundPos);
   le = (strlen(output_format) - strlen(extra))+foundPos-1;
   output_format[le]='\0';
@@ -1583,8 +1583,8 @@ void DialogCMDBuild1(unsigned char *output_resid, unsigned char *output_format,
 
   /* left */
   // \0
-  sprintf(output_format,"%s\" top=\"%s",output_format,extra);  
-  foundPos=0;  
+  sprintf(output_format,"%s\" top=\"%s",output_format,extra);
+  foundPos=0;
   find_str(' ',extra,&foundPos);
   le = (strlen(output_format) - strlen(extra))+foundPos-1;
   output_format[le]='\0';
@@ -1593,8 +1593,8 @@ void DialogCMDBuild1(unsigned char *output_resid, unsigned char *output_format,
 
   /* right */
   // \0
-  sprintf(output_format,"%s\" width=\"%s",output_format,extra);  
-  foundPos=0;  
+  sprintf(output_format,"%s\" width=\"%s",output_format,extra);
+  foundPos=0;
   find_str(' ',extra,&foundPos);
   le = (strlen(output_format) - strlen(extra))+foundPos-1;
   output_format[le]='\0';
@@ -1603,8 +1603,8 @@ void DialogCMDBuild1(unsigned char *output_resid, unsigned char *output_format,
 
   /* bottom */
   // \0
-  sprintf(output_format,"%s\" height=\"%s",output_format,extra);  
-  foundPos=0;  
+  sprintf(output_format,"%s\" height=\"%s",output_format,extra);
+  foundPos=0;
   find_str(' ',extra,&foundPos);
   if (foundPos!=0)
   {
@@ -1613,162 +1613,162 @@ void DialogCMDBuild1(unsigned char *output_resid, unsigned char *output_format,
          output_format[le]='\0';
          sprintf(extra,"%s",&output_format[le+1]);
          trim(extra);
-        
+
      /* style */
-        size = strlen(output_format) + strlen(extra) + 9; 
-        sprintf(output_format,"%s\" style=\"%s",output_format,extra);           
+        size = strlen(output_format) + strlen(extra) + 9;
+        sprintf(output_format,"%s\" style=\"%s",output_format,extra);
         output_format[size]='\0';
-        foundPos=0;  
+        foundPos=0;
      find_str(' ',extra,&foundPos);
 
     if (*output_resid!='\0')
     {
-        sprintf(output_format,"%s\"><![CDATA[%s]]></obj>\n",output_format,output_resid);   
+        sprintf(output_format,"%s\"><![CDATA[%s]]></obj>\n",output_format,output_resid);
     }
     else
     {
-          sprintf(output_format,"%s\"></obj>\n",output_format);   
+          sprintf(output_format,"%s\"></obj>\n",output_format);
     }
-  } 
+  }
   else
   {
     if (*output_resid!='\0')
-        sprintf(output_format,"%s\" style=\"\"><![CDATA[%s]]></obj>\n",output_format,output_resid);   
+        sprintf(output_format,"%s\" style=\"\"><![CDATA[%s]]></obj>\n",output_format,output_resid);
     else
-           sprintf(output_format,"%s\" style=\"\"></obj>\n",output_format);   
+           sprintf(output_format,"%s\" style=\"\"></obj>\n",output_format);
   }
 
   *output_resid='\0';
 }
+
 
 void DialogCMDBuild2(unsigned char *output_resid, unsigned char *output_format, long pos, unsigned char * text)
-{   
+{
   long le;
 
   stringbugs(output_resid,true);
   sprintf(output_resid,"%s",&output_resid[pos]);
   trim(output_resid);
-   
+
   le = strlen(output_resid);
   if (*output_resid=='"')
       *output_resid=' ';
   if (output_resid[le-1]=='"')
       output_resid[le-1]=' ';
 
-  trim(output_resid);    
-  sprintf(output_format,"%s  <obj type=\"%s\"><![CDATA[%s]]></obj>\n",output_format,text,output_resid);  
-  *output_resid='\0';  
+  trim(output_resid);
+  sprintf(output_format,"%s  <obj type=\"%s\"><![CDATA[%s]]></obj>\n",output_format,text,output_resid);
+  *output_resid='\0';
 }
 
-// input  : CONTROL         "",101,"Static",SS_SIMPLE | SS_NOPREFIX,3,6,150,10  
+// input  : CONTROL         "",101,"Static",SS_SIMPLE | SS_NOPREFIX,3,6,150,10
 void DialogCMDBuild3(unsigned char *output_resid, unsigned char *output_format, long pos, unsigned char * text)
 {
   long foundPos=0;
   long foundNextPos=0;
-  long le;  
+  long le;
   long count=0;
   long save1;
   long save2;
+
   sprintf(output_resid,"%s",&output_resid[pos]);
   trim(output_resid);
+
   find_str('"',output_resid,&foundPos);
   find_str('"',&output_resid[foundPos],&foundNextPos);
 
   save1=foundPos;
   save2=foundNextPos;
-  
+
   sprintf(output_format,"%s  <obj type=\"%s\" rc_name=\"",output_format,text);
-  
+
   le=strlen(output_format);
   count=foundNextPos+foundPos;
   if (output_resid[count]==',')
       output_resid[count]=' ';
   foundPos=0;
   find_str(',',&output_resid[count],&foundPos);
-  sprintf(output_format,"%s%s\"",output_format,&output_resid[count]);   
-  output_format[le+foundPos]='\0';  
+  sprintf(output_format,"%s%s\"",output_format,&output_resid[count]);
+  output_format[le+foundPos]='\0';
   stringbugs(&output_format[le],false);
   count+=foundPos;
 
-  /* prop */  
-  sprintf(output_format,"%s\" prop=\"",output_format); 
+  /* prop */
+  sprintf(output_format,"%s\" prop=\"",output_format);
   le=strlen(output_format);
-  sprintf(output_format,"%s%s",output_format,&output_resid[count]);   
+  sprintf(output_format,"%s%s",output_format,&output_resid[count]);
 
   if (output_resid[count]==',')
       output_resid[count]=' ';
   foundPos=0;
   find_str(',',&output_resid[count],&foundPos);
-  output_format[le+foundPos]='\0'; 
+  output_format[le+foundPos]='\0';
   stringbugs(&output_format[le],false);
   count+=foundPos;
 
-  /* style */  
-  sprintf(output_format,"%s\" style=\"",output_format); 
+  /* style */
+  sprintf(output_format,"%s\" style=\"",output_format);
   le=strlen(output_format);
-  sprintf(output_format,"%s%s",output_format,&output_resid[count]);   
+  sprintf(output_format,"%s%s",output_format,&output_resid[count]);
 
   if (output_resid[count]==',')
       output_resid[count]=' ';
   foundPos=0;
   find_str(',',&output_resid[count],&foundPos);
-  output_format[le+foundPos]='\0'; 
+  output_format[le+foundPos]='\0';
   stringbugs(&output_format[le],false);
   count+=foundPos;
 
-  /* top */  
-  sprintf(output_format,"%s\" left=\"",output_format); 
+  /* top */
+  sprintf(output_format,"%s\" left=\"",output_format);
   le=strlen(output_format);
-  sprintf(output_format,"%s%s",output_format,&output_resid[count]);   
+  sprintf(output_format,"%s%s",output_format,&output_resid[count]);
 
   if (output_resid[count]==',')
       output_resid[count]=' ';
   foundPos=0;
   find_str(',',&output_resid[count],&foundPos);
-  output_format[le+foundPos]='\0'; 
+  output_format[le+foundPos]='\0';
   stringbugs(&output_format[le],false);
   count+=foundPos;
 
-  /* left */  
-  sprintf(output_format,"%s\" top=\"",output_format); 
+  /* left */
+  sprintf(output_format,"%s\" top=\"",output_format);
   le=strlen(output_format);
-  sprintf(output_format,"%s%s",output_format,&output_resid[count]);   
+  sprintf(output_format,"%s%s",output_format,&output_resid[count]);
 
   if (output_resid[count]==',')
       output_resid[count]=' ';
   foundPos=0;
   find_str(',',&output_resid[count],&foundPos);
-  output_format[le+foundPos]='\0'; 
+  output_format[le+foundPos]='\0';
   stringbugs(&output_format[le],false);
   count+=foundPos;
 
-  /* right */  
-  sprintf(output_format,"%s\" width=\"",output_format); 
+  /* right */
+  sprintf(output_format,"%s\" width=\"",output_format);
   le=strlen(output_format);
-  sprintf(output_format,"%s%s",output_format,&output_resid[count]);   
+  sprintf(output_format,"%s%s",output_format,&output_resid[count]);
 
   if (output_resid[count]==',')
       output_resid[count]=' ';
   foundPos=0;
   find_str(',',&output_resid[count],&foundPos);
-  output_format[le+foundPos]='\0'; 
+  output_format[le+foundPos]='\0';
   stringbugs(&output_format[le],false);
   count+=foundPos;
 
   /* bottom */
   sprintf(output_format,"%s\" height=\"",output_format);
   le=strlen(output_format);
-  sprintf(output_format,"%s%s",output_format,&output_resid[count]);   
+  sprintf(output_format,"%s%s",output_format,&output_resid[count]);
   stringbugs(&output_format[le],false);
 
-  /* string */      
-  output_resid[save1+save2]='\0';  
+  /* string */
+  output_resid[save1+save2]='\0';
   stringbugs(output_resid,true);
-  
+
+
   if (*output_resid!='\0')
       sprintf(output_format,"%s\"><![CDATA[%s]]></obj>\n",output_format,output_resid);
   else
index 083b998..831d9a9 100644 (file)
@@ -4,7 +4,7 @@
        <define name="_WIN32_WINNT">0x0501</define>
        <define name="__USE_W32API" />
       <library>kernel32</library>
-       <file>roswebparser.c</file>     
-      <file>utf8.c</file>      
+       <file>roswebparser.c</file>
+      <file>utf8.c</file>
 
 </module>
index f8584c7..74b625d 100644 (file)
@@ -1,14 +1,14 @@
 
 /*
- * Convert ansi to utf-8 
- * it does not support more that utf-16 
+ * Convert ansi to utf-8
+ * it does not support more that utf-16
  * the table we are using is base on utf-16 then we convert the table to utf-8
- * 
- * All table lookup the ansi char to utf-16 then we calc the utf-8 format. 
+ *
+ * All table lookup the ansi char to utf-16 then we calc the utf-8 format.
  */
 
-#include "oem437.h"       /* windows oem 437 */     
-#include "oem850.h"       /* windows oem 850 */  
+#include "oem437.h"       /* windows oem 437 */
+#include "oem850.h"       /* windows oem 850 */
 #include "Windows28591.h" /* windows 28591 aka ISO-2859-1 (Latin 1) */
 #include "Windows28592.h" /* windows 28592 aka ISO-2859-2 (Latin 2) */
 
@@ -23,24 +23,24 @@ int ansiCodePage(int codepage, unsigned char *inBuffer, unsigned char *outBuffer
          ch=-1;
          if (codepage == 437)
          {
-                 ch = (int) table_OEM437[ ((unsigned char)inBuffer[t])]; 
+                 ch = (int) table_OEM437[ ((unsigned char)inBuffer[t])];
          }
 
          if (codepage == 850)
          {
-                 ch = (int) table_OEM850[ ((unsigned char)inBuffer[t])];                                 
+                 ch = (int) table_OEM850[ ((unsigned char)inBuffer[t])];
          }
 
          if (codepage == 28591)
          {
-                 ch = (int) table_Windows28591[ ((unsigned char)inBuffer[t])];                                   
+                 ch = (int) table_Windows28591[ ((unsigned char)inBuffer[t])];
          }
          if (codepage == 28592)
          {
-                 ch = (int) table_Windows28592[ ((unsigned char)inBuffer[t])];                                   
+                 ch = (int) table_Windows28592[ ((unsigned char)inBuffer[t])];
          }
 
-         
+
 
 
          if (ch == -1)
@@ -54,22 +54,22 @@ int ansiCodePage(int codepage, unsigned char *inBuffer, unsigned char *outBuffer
                  pos++;
          }
          else if  (ch <=0x07FF) // 1 1111 11 1111
-         {                                            
-         outBuffer[pos]= 0xC0  | (0x1F & (ch >> 6));   // 110x xxxx 
-                outBuffer[pos+1]= 0x80 | (0x3f & ch);  // 11xx xxxx     
+         {
+         outBuffer[pos]= 0xC0  | (0x1F & (ch >> 6));   // 110x xxxx
+                outBuffer[pos+1]= 0x80 | (0x3f & ch);  // 11xx xxxx
                 pos+=2;
          }
 
-         else if  (ch <=0xFFFF) // 11 11 11 11 11 11 11 11 
-         {                     
-         outBuffer[pos]= 0xC2  | (0xf & (ch >> 12)); // 1110xxxx 
+         else if  (ch <=0xFFFF) // 11 11 11 11 11 11 11 11
+         {
+         outBuffer[pos]= 0xC2  | (0xf & (ch >> 12)); // 1110xxxx
                 outBuffer[pos+1]= 0x80 | (0x3f & (ch >> 6));  // 10xxxxxx
-                outBuffer[pos+1]= 0x80 | (0x3f & ch);  // 10xxxxxx                                                         
+                outBuffer[pos+1]= 0x80 | (0x3f & ch);  // 10xxxxxx
                 pos+=3;
          }
 
-  }  
-  
+  }
+
   return pos;
 }
 
index 92d0373..ca565b8 100644 (file)
@@ -29,7 +29,7 @@ IDI_ZOOMIN              ICON    DISCARDABLE     "zoomin.ico"
 // Menu
 //
 
-IDR_ZOOMIN_MENU MENU DISCARDABLE 
+IDR_ZOOMIN_MENU MENU DISCARDABLE
 BEGIN
     POPUP "&File"
     BEGIN
@@ -74,7 +74,7 @@ END
 // String Table
 //
 
-STRINGTABLE DISCARDABLE 
+STRINGTABLE DISCARDABLE
 BEGIN
     IDS_APP_TITLE           "ReactOS Zoomin"
 END
@@ -85,7 +85,7 @@ END
 // Accelerator
 //
 
-IDR_ZOOMIN ACCELERATORS DISCARDABLE 
+IDR_ZOOMIN ACCELERATORS DISCARDABLE
 BEGIN
     VK_F5,          ID_REFRESH,             VIRTKEY, NOINVERT
 END
index 2ddebba..4bfcb79 100644 (file)
@@ -5,7 +5,7 @@
        <define name="_WIN32_IE">0x0501</define>
        <define name="_WIN32_WINNT">0x0501</define>
        <library>kernel32</library>
-       <library>gdi32</library> 
+       <library>gdi32</library>
        <file>applicat.c</file>
        <file>barchart.c</file>
        <file>box.c</file>
index e34ea22..5f21281 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: edit.rc,v 1.3 2004/10/16 22:30:17 gvg Exp $ */
+/* $Id$ */
 
 #define REACTOS_STR_FILE_DESCRIPTION   "FreeDOS/ReactOS Text Editor\0"
 #define REACTOS_STR_INTERNAL_NAME      "edit\0"
index 014bca2..7b9c2bd 100644 (file)
@@ -42,7 +42,7 @@
        <directory name="imagesoft">
                <xi:include href="imagesoft/imagesoft.rbuild" />
        </directory>
-       
+
        <directory name="lib">
                <xi:include href="lib/directory.rbuild" />
        </directory>
@@ -84,7 +84,7 @@
        <directory name="screenshot">
                <xi:include href="screenshot/screenshot.rbuild" />
        </directory>
-       
+
        <!--
        <directory name="smartpdf">
                <xi:include href="smartpdf/fitz.rbuild" />
@@ -92,7 +92,7 @@
                <xi:include href="smartpdf/smartpdf.rbuild" />
        </directory>
        -->
-       
+
        <directory name="sysutils">
                <xi:include href="sysutils/sysutils.rbuild" />
        </directory>
index 78fb190..ae77b49 100644 (file)
@@ -57,7 +57,7 @@ dlQueryInterface(IBindStatusCallback* This, REFIID riid, void** ppvObject)
     {
                return E_POINTER;
     }
-    
+
        if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IBindStatusCallback))
     {
                IBindStatusCallback_AddRef( This );
@@ -72,7 +72,7 @@ static ULONG WINAPI
 dlAddRef(IBindStatusCallback* iface)
 {
        IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
-    
+
        return InterlockedIncrement(&This->ref);
 }
 
@@ -81,13 +81,13 @@ dlRelease(IBindStatusCallback* iface)
 {
        IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
        DWORD ref = InterlockedDecrement(&This->ref);
-    
+
        if( !ref )
     {
                DestroyWindow( This->hDialog );
                HeapFree(GetProcessHeap(), 0, This);
     }
-    
+
        return ref;
 }
 
@@ -242,7 +242,7 @@ ThreadFunc(LPVOID Context)
        {
                goto end;
        }
-  
+
        DWORD dwSize = MAX_PATH;
        if (RegQueryValueEx(hKey,
                                                L"DownloadFolder",
@@ -253,7 +253,7 @@ ThreadFunc(LPVOID Context)
        {
                goto end;
        }
-  
+
        if (GetFileAttributes(path) == 0xFFFFFFFF)
                if (!CreateDirectory((LPCTSTR)path,NULL))
                {
index e20d624..c6b8bd7 100644 (file)
@@ -25,7 +25,7 @@ BEGIN
   PUSHBUTTON "&Abbrechen", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Download ! - ReactOS Downloader"\r
   IDS_WELCOME_TITLE            "Willkommen im ReactOS Downloader"\r
index 7a6343e..2674e97 100644 (file)
@@ -25,7 +25,7 @@ BEGIN
   PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Download ! - ReactOS Downloader"\r
   IDS_WELCOME_TITLE            "Welcome to the ReactOS Downloader"\r
index 30548e8..99561cb 100644 (file)
@@ -25,7 +25,7 @@ BEGIN
   PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "¡Descargar! - Descargador de ReactOS"\r
   IDS_WELCOME_TITLE            "Bienvenido al descargador de ReactOS"\r
index 978515e..9c9e53c 100644 (file)
@@ -25,7 +25,7 @@ BEGIN
   PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Télécharger ! - Téléchargeur de ReactOS"\r
   IDS_WELCOME_TITLE            "Bienvenue dans le Téléchargeur de ReactOS"\r
index 788b74f..c0a0d23 100644 (file)
@@ -25,7 +25,7 @@ BEGIN
   PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Download ! - ReactOS Downloader"\r
   IDS_WELCOME_TITLE            "Selamat datang di ReactOS Downloader"\r
index aa55f91..b7a4a17 100644 (file)
@@ -25,7 +25,7 @@ BEGIN
   PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Download ! - ReactOS Downloader"\r
   IDS_WELCOME_TITLE            "Benvenuto al ReactOS Downloader"\r
index 79f9634..8828125 100644 (file)
@@ -27,7 +27,7 @@ BEGIN
   PUSHBUTTON "Î&òìåíà", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Ñêà÷àòü! - Ìåíåäæåð çàêà÷åê ReactOS"\r
   IDS_WELCOME_TITLE            "Äîáðî ïîæàëîâàòü â Ìåíåäæåð çàêà÷åê ReactOS"\r
index 9df43e6..48c6c02 100644 (file)
@@ -33,7 +33,7 @@ BEGIN
   PUSHBUTTON "&Cancel", IDCANCEL, 207, 90, 54, 15\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
   IDS_WINDOW_TITLE             "Çàâàíòàæèòè ! - Çàâàíòàæóâà÷ ReactOS"\r
   IDS_WELCOME_TITLE            "Ëàñêàâî ïðîñèìî ó Çàâàíòàæóâà÷ ReactOS"\r
index 2a69444..280ad23 100644 (file)
@@ -75,19 +75,19 @@ ShowMessage (WCHAR* title, WCHAR* message)
 {
        DescriptionHeadline = title;
        DescriptionText = message;
-       InvalidateRect(hwnd,NULL,TRUE); 
+       InvalidateRect(hwnd,NULL,TRUE);
        UpdateWindow(hwnd);
 }
 
 void
 AddItems(HWND hwnd, struct Category* Category, struct Category* Parent)
-{ 
-       TV_INSERTSTRUCTW Insert; 
+{
+       TV_INSERTSTRUCTW Insert;
 
        Insert.item.lParam = (UINT)Category;
        Insert.item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_IMAGE|TVIF_SELECTEDIMAGE;;
        Insert.item.pszText = Category->Name;
-       Insert.item.cchTextMax = lstrlenW(Category->Name); 
+       Insert.item.cchTextMax = lstrlenW(Category->Name);
        Insert.item.iImage = Category->Icon;
        Insert.item.iSelectedImage = Category->Icon;
        Insert.hInsertAfter = TVI_LAST;
@@ -108,7 +108,7 @@ CategoryChoosen(HWND hwnd, struct Category* Category)
        struct Application* CurrentApplication;
        TV_INSERTSTRUCTW Insert;
        SelectedApplication = NULL;
-       
+
        if(Category->Children && !Category->Apps)
                ShowMessage(Category->Name, Strings[IDS_CHOOSE_SUB]);
        else if(!Category->Children && Category->Apps)
@@ -119,7 +119,7 @@ CategoryChoosen(HWND hwnd, struct Category* Category)
                ShowMessage(Category->Name, Strings[IDS_NO_APPS]);
 
        (void)TreeView_DeleteItem(hwnd, TVI_ROOT);
-       (void)TreeView_DeleteItem(hwnd, TVI_ROOT); // Delete twice to bypass bug in windows 
+       (void)TreeView_DeleteItem(hwnd, TVI_ROOT); // Delete twice to bypass bug in windows
 
        Insert.item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_IMAGE;
        Insert.hInsertAfter = TVI_LAST;
@@ -137,7 +137,7 @@ CategoryChoosen(HWND hwnd, struct Category* Category)
                if(StrCmpW(CurrentApplication->RegName,L"")) {
                        if(getUninstaller(CurrentApplication->RegName, Uninstaller))
                                Insert.item.iImage = 9;
-               } 
+               }
                SendMessage(hwnd, TVM_INSERTITEM, 0, (LPARAM)&Insert);
                CurrentApplication = CurrentApplication->Next;
        }
@@ -158,7 +158,7 @@ SetupControls (HWND hwnd)
        if(!GetSystemDirectory(Buf,sizeof(Buf)/sizeof(char))) return FALSE;
        lstrcat((LPTSTR)Buf, L"\\downloader.xml");
        for (i = 0; i < _tcslen(Buf) + 1; i++) Tmp[i] = Buf[i];
-       
+
        // Parse the XML file
        if (!ProcessXML(Tmp, &Root))
                return FALSE;
@@ -168,11 +168,11 @@ SetupControls (HWND hwnd)
 
        // Set up the controls
        hCategories = CreateWindowExW(0, WC_TREEVIEWW, Cats,
-                                                                 WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS, 
+                                                                 WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS,
                                                                  0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
 
        hApps = CreateWindowExW(0, WC_TREEVIEWW, Apps,
-                                                       WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS, 
+                                                       WS_CHILD|WS_VISIBLE|WS_BORDER|TVS_HASLINES|TVS_LINESATROOT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS,
                                                        0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
 
        hLogo = LoadBitmap(GetModuleHandle(NULL),
@@ -200,7 +200,7 @@ SetupControls (HWND hwnd)
                                                                         WS_CHILD | WS_VISIBLE | BS_BITMAP,
                                                                         260, 505, 140, 33,
                                                                         hwnd, 0, hInstance, NULL);
-       
+
        SendMessageW(hProfButton,
                                BM_SETIMAGE,
                                (WPARAM)IMAGE_ICON,
@@ -226,9 +226,9 @@ SetupControls (HWND hwnd)
        // Set deflaut entry for hApps
        Insert.item.mask = TVIF_TEXT|TVIF_IMAGE;
        Insert.item.pszText = Strings[IDS_CHOOSE_CATEGORY];
-       Insert.item.cchTextMax = lstrlenW(Strings[IDS_CHOOSE_CATEGORY]); 
+       Insert.item.cchTextMax = lstrlenW(Strings[IDS_CHOOSE_CATEGORY]);
        Insert.item.iImage = 0;
-       SendMessage(hApps, TVM_INSERTITEM, 0, (LPARAM)&Insert); 
+       SendMessage(hApps, TVM_INSERTITEM, 0, (LPARAM)&Insert);
 
        // Create Tree Icons
        hImageList = ImageList_Create(16, 16, ILC_COLORDDB, 1, 1);
@@ -236,25 +236,25 @@ SetupControls (HWND hwnd)
        SendMessageW(hApps, TVM_SETIMAGELIST, TVSIL_NORMAL, (LPARAM)(HIMAGELIST)hImageList);
 
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_0)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_0)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_1)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_1)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_2)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_2)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_3)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_3)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_4)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_4)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_5)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_5)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_6)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_6)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_7)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_7)), NULL);
        ImageList_Add(hImageList,
                                  LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_8)), NULL);
        ImageList_Add(hImageList,
-                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_9)), NULL); 
+                                 LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_9)), NULL);
        ImageList_Add(hImageList,
                                  LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_TREEVIEW_ICON_10)), NULL);
        ImageList_Add(hImageList,
@@ -305,14 +305,14 @@ DrawDescription (HDC hdc, RECT DescriptionRect)
                DrawBitmap(hdc, i, DescriptionRect.top+22, hUnderline); // less code then stretching ;)
 
        // Headline
-       Font = CreateFont(-16 , 0, 0, 0, FW_EXTRABOLD, FALSE, FALSE, FALSE, ANSI_CHARSET, 
+       Font = CreateFont(-16 , 0, 0, 0, FW_EXTRABOLD, FALSE, FALSE, FALSE, ANSI_CHARSET,
                                          OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, L"Arial");
        SelectObject(hdc, Font);
        DrawTextW(hdc, DescriptionHeadline, lstrlenW(DescriptionHeadline), &Rect, DT_SINGLELINE|DT_NOPREFIX);
        DeleteObject(Font);
 
        // Description
-       Font = CreateFont(-13 , 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 
+       Font = CreateFont(-13 , 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
                                          OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_DONTCARE, L"Arial");
        SelectObject(hdc, Font);
        Rect.top += 50;
@@ -346,7 +346,7 @@ void startUninstaller(WCHAR* Uninstaller) {
 
        memset(&si, 0, sizeof(si));
        si.cb = sizeof(si);
-       CreateProcessW(NULL,Uninstaller,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi); 
+       CreateProcessW(NULL,Uninstaller,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
        CloseHandle(pi.hThread);
        // WaitForSingleObject(pi.hProcess, INFINITE); // If you want to wait for the Unistaller
        CloseHandle(pi.hProcess);
@@ -358,12 +358,12 @@ SaveSettings(HWND hwnd)
 {
        HKEY hKey;
        TCHAR szBuf[MAX_PATH];
-       
+
        if (RegOpenKey(HKEY_LOCAL_MACHINE,
                    TEXT("Software\\ReactOS\\Download!"),
                    &hKey) != ERROR_SUCCESS)
                return FALSE;
-       
+
        SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_GETTEXT, sizeof(szBuf)/sizeof(TCHAR), (LPARAM)szBuf);
        if (GetFileAttributes(szBuf) == 0xFFFFFFFF)
                if (!CreateDirectory((LPCTSTR)szBuf,NULL))
@@ -379,7 +379,7 @@ SaveSettings(HWND hwnd)
                                          (LPBYTE)szBuf,
                                          (DWORD)(sizeof(szBuf) / sizeof(TCHAR))))
                return FALSE;
-               
+
        SendMessage(GetDlgItem(hwnd, IDC_UPDATE_SERVER_EDIT), WM_GETTEXT, sizeof(szBuf)/sizeof(TCHAR), (LPARAM)szBuf);
        if (RegSetValueEx(hKey,
                                          L"UpdateServer",
@@ -388,7 +388,7 @@ SaveSettings(HWND hwnd)
                                          (LPBYTE)szBuf,
                                          (DWORD)(sizeof(szBuf) / sizeof(TCHAR))))
                return FALSE;
-       
+
        DWORD dwValue;
        if (SendMessage(GetDlgItem(hwnd, IDC_DELINST_FILES_CHECKBOX), BM_GETCHECK, 0, 0) == BST_CHECKED)
                dwValue = 0x1;
@@ -401,9 +401,9 @@ SaveSettings(HWND hwnd)
                                          (LPBYTE)&dwValue,
                                          sizeof(DWORD)))
                        return FALSE;
-       
+
        RegCloseKey(hKey);
-       
+
        return TRUE;
 }
 
@@ -413,12 +413,12 @@ InitProfDlg(HWND hwnd)
        HKEY hKey;
        TCHAR Buf[MAX_PATH];
        DWORD dwDisp, dwSize;
-       
+
        if (RegOpenKey(HKEY_LOCAL_MACHINE,
                    TEXT("Software\\ReactOS\\Download!"),
                    &hKey) != ERROR_SUCCESS)
        {
-               if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, L"Software\\ReactOS\\Download!", 
+               if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, L"Software\\ReactOS\\Download!",
                                                   0, NULL, REG_OPTION_NON_VOLATILE,
                                                   KEY_WRITE, NULL, &hKey, &dwDisp))
                {
@@ -427,7 +427,7 @@ InitProfDlg(HWND hwnd)
                        return FALSE;
                }
        }
-       
+
        dwSize = MAX_PATH;
        if (RegQueryValueEx(hKey,
                         L"DownloadFolder",
@@ -441,7 +441,7 @@ InitProfDlg(HWND hwnd)
        else
        {
                if (!GetWindowsDirectory(Buf, sizeof(Buf) / sizeof(TCHAR))) return FALSE;
-                       
+
                TCHAR DPath[256];
                int i;
                for (i = 0; i < 4; i++)
@@ -469,7 +469,7 @@ InitProfDlg(HWND hwnd)
                        SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_SETTEXT, -1, (LPARAM)DPath);
                }
        }
-       
+
        dwSize = MAX_PATH;
        if (RegQueryValueEx(hKey,
                         L"UpdateServer",
@@ -495,7 +495,7 @@ InitProfDlg(HWND hwnd)
                        SendMessage(GetDlgItem(hwnd, IDC_UPDATE_SERVER_EDIT), WM_SETTEXT, -1, (LPARAM)Buf);
                }
        }
-       
+
        DWORD dwValue, dwType = REG_DWORD;
        dwSize = sizeof(DWORD);
        if (RegQueryValueEx(hKey,
@@ -519,9 +519,9 @@ InitProfDlg(HWND hwnd)
                                                  sizeof(DWORD)))
                        return FALSE;
        }
-       
+
        RegCloseKey(hKey);
-       
+
        return TRUE;
 }
 
@@ -531,7 +531,7 @@ ChooseFolder(HWND hwnd)
        BROWSEINFO fi;
        LPCITEMIDLIST lpItemList;
        TCHAR szPath[MAX_PATH],Buf[256];
-       
+
        ZeroMemory(&fi, sizeof(BROWSEINFO));
        fi.hwndOwner = hwnd;
        LoadString(GetModuleHandle(NULL), IDS_CHOOSE_FOLDER, Buf, sizeof(Buf) / sizeof(TCHAR));
@@ -540,13 +540,13 @@ ChooseFolder(HWND hwnd)
        fi.lpfn = NULL;
        fi.lParam = -1;
        fi.iImage = 0;
-       
+
        if(!(lpItemList = SHBrowseForFolder(&fi))) return FALSE;
        SHGetPathFromIDList(lpItemList, szPath);
-       
+
        if (_tcslen(szPath) == 0) return FALSE;
        SendMessage(GetDlgItem(hwnd, IDC_DOWNLOAD_FOLDER_EDIT), WM_SETTEXT, -1, (LPARAM)szPath);
-       
+
        return TRUE;
 }
 
@@ -611,7 +611,7 @@ WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
                        if(!SetupControls(hwnd))
                                return -1;
                        ShowMessage(Strings[IDS_WELCOME_TITLE], Strings[IDS_WELCOME]);
-               } 
+               }
                break;
 
                case WM_PAINT:
@@ -621,11 +621,11 @@ WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
                        HDC BackbufferHdc = CreateCompatibleDC(hdc);
                        HBITMAP BackbufferBmp = CreateCompatibleBitmap(hdc, ps.rcPaint.right, ps.rcPaint.bottom);
                        SelectObject(BackbufferHdc, BackbufferBmp);
-                       
+
                        FillRect(BackbufferHdc, &ps.rcPaint, CreateSolidBrush(RGB(235,235,235)));
                        DrawBitmap(BackbufferHdc, 10, 12, hLogo);
                        DrawDescription(BackbufferHdc, DescriptionRect);
-                       
+
                        BitBlt(hdc, 0, 0, ps.rcPaint.right, ps.rcPaint.bottom, BackbufferHdc, 0, 0, SRCCOPY);
                        DeleteObject(BackbufferBmp);
                        DeleteDC(BackbufferHdc);
@@ -680,12 +680,12 @@ WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
                        if(data->code == TVN_SELCHANGED)
                        {
                                BOOL bShowUninstaller = FALSE;
-                               if(data->hwndFrom == hCategories) 
+                               if(data->hwndFrom == hCategories)
                                {
                                        struct Category* Category = (struct Category*) ((LPNMTREEVIEW)lParam)->itemNew.lParam;
                                        CategoryChoosen (hApps, Category);
                                }
-                               else if(data->hwndFrom == hApps) 
+                               else if(data->hwndFrom == hApps)
                                {
                                        SelectedApplication = (struct Application*) ((LPNMTREEVIEW)lParam)->itemNew.lParam;
                                        if(SelectedApplication)
@@ -760,7 +760,7 @@ WndProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
 
                case WM_DESTROY:
                {
-                       DeleteObject(hLogo);    
+                       DeleteObject(hLogo);
                        if(Root.Children)
                                FreeTree(Root.Children);
                        PostQuitMessage(0);
@@ -786,10 +786,10 @@ wWinMain (HINSTANCE hInstance,
 
        // Load strings
        for(i=0; i<STRING_COUNT; i++)
-               LoadStringW(hInstance, i, Strings[i], MAX_STRING_LENGHT); // if you know a better method please tell me. 
+               LoadStringW(hInstance, i, Strings[i], MAX_STRING_LENGHT); // if you know a better method please tell me.
 
        // Create the window
-       WndClass.cbSize                 = sizeof(WNDCLASSEX); 
+       WndClass.cbSize                 = sizeof(WNDCLASSEX);
        WndClass.lpszClassName  = L"Downloader";
        WndClass.lpfnWndProc    = WndProc;
        WndClass.hInstance              = hInstance;
@@ -799,14 +799,14 @@ wWinMain (HINSTANCE hInstance,
 
        RegisterClassExW(&WndClass);
 
-       hwnd = CreateWindowW(L"Downloader", 
+       hwnd = CreateWindowW(L"Downloader",
                                                Strings[IDS_WINDOW_TITLE],
                                                WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN,
-                                               CW_USEDEFAULT,  
-                                               CW_USEDEFAULT,   
-                                               650, 550, 
+                                               CW_USEDEFAULT,
+                                               CW_USEDEFAULT,
+                                               650, 550,
                                                NULL, NULL,
-                                               hInstance, 
+                                               hInstance,
                                                NULL);
 
        // Show it
index a5c2aaf..c05f3e6 100644 (file)
@@ -51,7 +51,7 @@ void tag_opened (void* usrdata, const char* tag, const char** arg)
                }
                TagOpen = TRUE;
 
-               for (i=0; arg[i]; i+=2) 
+               for (i=0; arg[i]; i+=2)
                {
                        if(!strcmp(arg[i], "name"))
                        {
@@ -82,7 +82,7 @@ void tag_opened (void* usrdata, const char* tag, const char** arg)
                        CurrentApplication = Current->Apps;
                }
 
-               for (i=0; arg[i]; i+=2) 
+               for (i=0; arg[i]; i+=2)
                {
                        if(!strcmp(arg[i], "name"))
                        {
@@ -157,7 +157,7 @@ void tag_closed (void* tree, const char* tag)
        }
 }
 
-BOOL ProcessXML (const char* filename, struct Category* Root) 
+BOOL ProcessXML (const char* filename, struct Category* Root)
 {
        int done = 0;
        char buffer[255];
@@ -171,10 +171,10 @@ BOOL ProcessXML (const char* filename, struct Category* Root)
        TagOpen = TRUE;
 
        file = fopen("downloader.xml", "r");
-       if(!file) 
+       if(!file)
        {
                file = fopen(filename, "r");
-               if(!file) 
+               if(!file)
                {
                        MessageBoxW(0,Strings[IDS_XMLERROR_1],0,0);
                        return FALSE;
@@ -190,7 +190,7 @@ BOOL ProcessXML (const char* filename, struct Category* Root)
                size_t len = fread (buffer, 1, sizeof(buffer), file);
                done = len < sizeof(buffer);
 
-               if(!XML_Parse(parser, buffer, len, done)) 
+               if(!XML_Parse(parser, buffer, len, done))
                {
                        MessageBoxW(0,Strings[IDS_XMLERROR_2],0,0);
                        return FALSE;
index f9121f0..dcbd158 100644 (file)
@@ -194,7 +194,7 @@ Display_SetTypeFace(HWND hwnd, LPARAM lParam)
        si.nPage  = rect.bottom;\r
        si.nPos   = 0;\r
        si.nTrackPos = 0;\r
-       SetScrollInfo(hwnd, SB_VERT, &si, TRUE); \r
+       SetScrollInfo(hwnd, SB_VERT, &si, TRUE);\r
 \r
        return 0;\r
 }\r
index 54a6ed6..7881a25 100644 (file)
@@ -82,7 +82,7 @@ ErrorMsgBox(HWND hParent, DWORD dwCaptionID, DWORD dwMessageId, ...)
        LocalFree(hMemText);\r
 }\r
 \r
-int WINAPI \r
+int WINAPI\r
 WinMain (HINSTANCE hThisInstance,\r
          HINSTANCE hPrevInstance,\r
          LPSTR lpCmdLine,\r
index cd4b65a..fd103f2 100644 (file)
@@ -10,7 +10,7 @@ void UpdateDefragInfo (HWND Dlg)
     char PercentText[100];\r
 \r
     Defrag = (Defragment *) GetWindowLongPtr (Dlg, GWLP_USERDATA);\r
-    \r
+\r
     sprintf (PercentText, "%6.2f%%", Defrag->GetStatusPercent());\r
     PercentItem = GetDlgItem (Dlg, IDC_PERCENT);\r
     SendMessage (GetDlgItem (Dlg, IDC_PERCENT), WM_SETTEXT, 0, (LPARAM) PercentText);\r
index e78161f..bd97a53 100644 (file)
@@ -56,16 +56,16 @@ int FitName (wchar_t *destination, const wchar_t *path, const wchar_t *filename,
                len4path = pathLen;\r
                len4fn = (totalWidth - len4path);\r
        }\r
-       /* \r
-               if halfTotLen was adjusted above to avoid a rounding error, give the \r
-               extra wchar_t to the filename \r
+       /*\r
+               if halfTotLen was adjusted above to avoid a rounding error, give the\r
+               extra wchar_t to the filename\r
        */\r
-       if (halfTotLen < (totalWidth/2)) len4path++; \r
+       if (halfTotLen < (totalWidth/2)) len4path++;\r
 \r
        if (pathLen > len4path) swprintf (fmtStrPath, L"%%.%ds...\\", len4path-4);\r
        else\r
                swprintf (fmtStrPath, L"%%s");\r
-       \r
+\r
        if (fnLen > len4fn)     swprintf (fmtStrFile, L"%%.%ds...", len4fn-3);\r
        else\r
                swprintf (fmtStrFile, L"%%s");\r
@@ -74,8 +74,8 @@ int FitName (wchar_t *destination, const wchar_t *path, const wchar_t *filename,
        wcscat (fmtString, fmtStrFile);\r
        /*swprintf (fmtString, L"%s%s", fmtStrPath, fmtStrFile);*/\r
        swprintf (destination, fmtString, path,filename);\r
-       \r
-       return (1);     \r
+\r
+       return (1);\r
 }\r
 \r
 \r
@@ -304,7 +304,7 @@ void Defragment::Start (void)
             break;\r
         }\r
 \r
-        // \r
+        //\r
         Info = Volume.GetDBFile (i);\r
 \r
         PreviousClusters = ClustersProgress;\r
@@ -367,7 +367,7 @@ void Defragment::Start (void)
                     }\r
                 }\r
             }\r
\r
+\r
             // New: Only update bitmap if it's older than 15 seconds\r
             if ((GetTickCount() - LastBMPUpdate) < 15000)\r
                 Retry = 1;\r
index 0d9c18a..3b0863f 100644 (file)
@@ -48,7 +48,7 @@ bool DriveVolume::Open (wstring Name)
     RootPath = Name.c_str();\r
     RootPath += L"\\";\r
 \r
-    Handle = CreateFile \r
+    Handle = CreateFile\r
     (\r
         FileName,\r
         MAXIMUM_ALLOWED,                          // access\r
@@ -91,7 +91,7 @@ bool DriveVolume::Open (wstring Name)
             VolInfo.MaxNameLen = VolMaxFileLen;\r
             VolInfo.Name       = VolName;\r
 \r
-            swprintf (SerialText, L"%x-%x", (VolSN & 0xffff0000) >> 16, \r
+            swprintf (SerialText, L"%x-%x", (VolSN & 0xffff0000) >> 16,\r
                 VolSN & 0x0000ffff);\r
 \r
             wcsupr (SerialText);\r
@@ -153,7 +153,7 @@ bool DriveVolume::ObtainInfo (void)
     if (!Result)\r
         return (false);\r
 \r
-    VolInfo.ClusterSize = SectorsPerCluster * BytesPerSector;        \r
+    VolInfo.ClusterSize = SectorsPerCluster * BytesPerSector;\r
 \r
     Result = GetDiskFreeSpaceEx\r
     (\r
@@ -324,7 +324,7 @@ bool BuildDBCallback (FileInfo &Info, HANDLE &FileHandle, void *UserData)
         return (false);\r
 \r
     DBInfo->ClusterProgress += (uint64)Info.Clusters;\r
-    *(DBInfo->Percent) = \r
+    *(DBInfo->Percent) =\r
         ((double)DBInfo->ClusterProgress / (double)DBInfo->ClusterCount) * 100.0f;\r
 \r
     return (true);\r
@@ -511,12 +511,12 @@ bool DriveVolume::GetClusterInfo (FileInfo &Info, HANDLE &HandleResult)
     if (Handle == INVALID_HANDLE_VALUE)\r
     {\r
            LPVOID lpMsgBuf;\r
\r
+\r
            FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\r
-                                           NULL, GetLastError(), \r
+                                           NULL, GetLastError(),\r
                                            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\r
                                            (LPTSTR) &lpMsgBuf, 0, NULL );\r
-           \r
+\r
 \r
         Info.Attributes.AccessDenied = 1;\r
            LocalFree( lpMsgBuf );\r
@@ -529,7 +529,7 @@ bool DriveVolume::GetClusterInfo (FileInfo &Info, HANDLE &HandleResult)
     if (Result == FALSE)\r
     {\r
         Info.Attributes.AccessDenied = 1;\r
-        wprintf (L"GetFileInformationByHandle ('%s%s') failed\n", GetDBDir (Info.DirIndice).c_str(), \r
+        wprintf (L"GetFileInformationByHandle ('%s%s') failed\n", GetDBDir (Info.DirIndice).c_str(),\r
             Info.Name.c_str());\r
 \r
         CloseHandle (Handle);\r
@@ -705,10 +705,10 @@ bool DriveVolume::MoveFileDumb (uint32 FileIndice, uint64 NewLCN)
            LPVOID lpMsgBuf;\r
 \r
            FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\r
-                                           NULL, GetLastError(), \r
+                                           NULL, GetLastError(),\r
                                            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\r
                                            (LPTSTR) &lpMsgBuf, 0, NULL );\r
-           \r
+\r
 \r
            LocalFree (lpMsgBuf);\r
         //\r
@@ -762,12 +762,12 @@ bool DriveVolume::MoveFileDumb (uint32 FileIndice, uint64 NewLCN)
             {\r
                 //\r
                    LPVOID lpMsgBuf;\r
\r
+\r
                    FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,\r
-                                                   NULL, GetLastError(), \r
+                                                   NULL, GetLastError(),\r
                                                    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\r
                                                    (LPTSTR) &lpMsgBuf, 0, NULL );\r
-                   \r
+\r
 \r
                    LocalFree( lpMsgBuf );\r
                 //\r
@@ -778,7 +778,7 @@ bool DriveVolume::MoveFileDumb (uint32 FileIndice, uint64 NewLCN)
 \r
             // Ok good. Now update our drive bitmap and file infos.\r
             uint64 j;\r
-            for (j = 0; \r
+            for (j = 0;\r
                  j < Info.Fragments[i].Length;\r
                  j++)\r
             {\r
index cb43dda..e7f69bf 100644 (file)
@@ -99,8 +99,8 @@ public:
 \r
     // builds list of files on drive\r
     // if QuitMonitor ever becomes true (ie from a separate thread) it will clean up and return\r
-    bool BuildFileList   (bool &QuitMonitor, double &Progress); \r
-        \r
+    bool BuildFileList   (bool &QuitMonitor, double &Progress);\r
+\r
     // Functions for accessing the volume bitmap\r
     bool IsClusterUsed   (uint64 Cluster);\r
     void SetClusterUsed  (uint64 Cluster, bool Used);\r
index d3c7224..1e8b4ad 100644 (file)
@@ -27,26 +27,26 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 IDD_MAIN DIALOGEX 0, 0, 346, 103
-STYLE DS_SETFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | 
+STYLE DS_SETFONT | DS_CENTERMOUSE | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE |
     WS_CAPTION | WS_SYSMENU
 FONT 8, "MS Sans Serif", 0, 0, 0x1
 BEGIN
-    COMBOBOX        IDC_DRIVES_LIST,78,52,29,111,CBS_DROPDOWNLIST | CBS_SORT | 
+    COMBOBOX        IDC_DRIVES_LIST,78,52,29,111,CBS_DROPDOWNLIST | CBS_SORT |
                     WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_METHODS_LIST,135,52,77,79,CBS_DROPDOWNLIST | 
+    COMBOBOX        IDC_METHODS_LIST,135,52,77,79,CBS_DROPDOWNLIST |
                     WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_PRIORITY_LIST,223,52,59,91,CBS_DROPDOWNLIST | 
+    COMBOBOX        IDC_PRIORITY_LIST,223,52,59,91,CBS_DROPDOWNLIST |
                     WS_VSCROLL | WS_TABSTOP
     PUSHBUTTON      "Start",IDC_STARTSTOP,294,7,45,15
     PUSHBUTTON      "Help",ID_MAIN_HELP,294,28,45,15
     PUSHBUTTON      "Exit",IDC_QUIT,294,49,45,15
-    CONTROL         110,-1,"Static",SS_BITMAP | SS_SUNKEN | 
+    CONTROL         110,-1,"Static",SS_BITMAP | SS_SUNKEN |
                     WS_BORDER,7,7,63,58
     LTEXT           "Choose a drive:",-1,78,40,50,8
     LTEXT           "Choose an action:",-1,135,40,58,8
-    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER | 
+    CONTROL         "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER |
                     0x1,7,71,299,10
-    CONTROL         "Static",IDC_STATUS,"Static",SS_LEFTNOWORDWRAP | 
+    CONTROL         "Static",IDC_STATUS,"Static",SS_LEFTNOWORDWRAP |
                     SS_SUNKEN | WS_GROUP,7,86,332,10
     LTEXT           "I am a monkey, hear me eeK",IDC_WISECRACKS,78,15,91,8
     LTEXT           "100.00%",IDC_PERCENT,311,71,28,8,0,WS_EX_RIGHT
@@ -116,7 +116,7 @@ END
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
+GUIDELINES DESIGNINFO
 BEGIN
     IDD_MAIN, DIALOG
     BEGIN
@@ -143,18 +143,18 @@ END
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE 
+1 TEXTINCLUDE
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE 
+2 TEXTINCLUDE
 BEGIN
     "#include ""windows.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE 
+3 TEXTINCLUDE
 BEGIN
     "\r\n"
     "\0"
index efb3578..58f0cf4 100644 (file)
@@ -101,9 +101,9 @@ void UpdateDefragInfo (HWND Dlg)
 \r
     if (Defrag == NULL)\r
         return;\r
-   \r
+\r
     NewPercent = Defrag->GetStatusPercent ();\r
-    if (NewPercent > 100.0f) \r
+    if (NewPercent > 100.0f)\r
         NewPercent = 100.0f;\r
     if (NewPercent < 0.0f)\r
         NewPercent = 0.0f;\r
@@ -111,7 +111,7 @@ void UpdateDefragInfo (HWND Dlg)
     {\r
         swprintf (PercentText, L"%6.2f%%", NewPercent);\r
         SendDlgItemMessage (Dlg, IDC_PERCENT, WM_SETTEXT, 0, (LPARAM) PercentText);\r
-        SendDlgItemMessage (Dlg, IDC_PROGRESS, PBM_SETPOS, \r
+        SendDlgItemMessage (Dlg, IDC_PROGRESS, PBM_SETPOS,\r
             (WPARAM) (int)(NewPercent * 100.0f), 0);\r
         OldPercent = NewPercent;\r
     }\r
@@ -135,7 +135,7 @@ void UpdateDefragInfo (HWND Dlg)
             it++;\r
         }\r
 \r
-        SendDlgItemMessage (Dlg, IDC_STATUS, WM_SETTEXT, 0, \r
+        SendDlgItemMessage (Dlg, IDC_STATUS, WM_SETTEXT, 0,\r
             (LPARAM) Status.c_str());\r
 \r
         OldStatus = NewStatus;\r
@@ -166,7 +166,7 @@ wstring GetDefragTitle (void)
     DefragText = GetDefaultTitle ();\r
     if (Defrag != NULL)\r
     {\r
-        DefragText = wstring(Percent) + wstring (L" - ") + Defrag->GetVolume().GetRootPath() + \r
+        DefragText = wstring(Percent) + wstring (L" - ") + Defrag->GetVolume().GetRootPath() +\r
             wstring (L" - ") + DefragText;\r
     }\r
 \r
@@ -456,7 +456,7 @@ INT_PTR CALLBACK MainDialogProc (HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LPara
 \r
                 if (Defrag->IsDoneYet()  ||  Defrag->HasError())\r
                 {   // This is the code executed when defragging is finished (or stopped :)\r
-                    if (Defrag->GetDefragType() == DefragAnalyze  &&  \r
+                    if (Defrag->GetDefragType() == DefragAnalyze  &&\r
                         !Defrag->HasError()  &&\r
                         !Stopping)\r
                     {   // Show report\r
@@ -533,7 +533,7 @@ INT_PTR CALLBACK MainDialogProc (HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LPara
                         if (Defrag != NULL)\r
                             return (1);\r
 \r
-                        SendMessage (GetDlgItem (Dlg, IDC_DRIVES_LIST), WM_GETTEXT, \r
+                        SendMessage (GetDlgItem (Dlg, IDC_DRIVES_LIST), WM_GETTEXT,\r
                             sizeof (Drive) - 1, (LPARAM) Drive);\r
 \r
                         if (wcslen(Drive) != 2  ||  Drive[1] != L':')\r
@@ -556,7 +556,7 @@ INT_PTR CALLBACK MainDialogProc (HWND Dlg, UINT Msg, WPARAM WParam, LPARAM LPara
                             Defrag->SetDoLimitLength (false);\r
                             SetWindowText (Dlg, GetDefragTitle().c_str());\r
                             SetDisables (Dlg);\r
-                        }   \r
+                        }\r
                     }\r
                     else\r
                     {   // L"Stop"\r
index 157325b..c37ee63 100644 (file)
@@ -29,7 +29,7 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
     // DiskSizeBytes\r
     if (Fractional)\r
     {\r
-        swprintf (Text, L"%.2f %s", (double)(signed)(Report.DiskSizeBytes / \r
+        swprintf (Text, L"%.2f %s", (double)(signed)(Report.DiskSizeBytes /\r
             (BytesDivisor / 1024)) / 1024.0, BytesUnits);\r
     }\r
     else\r
@@ -44,7 +44,7 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
     // DiskFreeBytes\r
     if (Fractional)\r
     {\r
-        swprintf (Text, L"%.2f %s", (double)(signed)(Defrag->GetVolume().GetVolumeInfo().FreeBytes / \r
+        swprintf (Text, L"%.2f %s", (double)(signed)(Defrag->GetVolume().GetVolumeInfo().FreeBytes /\r
             (BytesDivisor / 1024)) / 1024.0, BytesUnits);\r
     }\r
     else\r
@@ -85,7 +85,7 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
     // FilesSizeBytes\r
     if (Fractional)\r
     {\r
-        swprintf (Text, L"%.2f %s", (double)(signed)(Report.FilesSizeBytes / \r
+        swprintf (Text, L"%.2f %s", (double)(signed)(Report.FilesSizeBytes /\r
             (BytesDivisor / 1024)) / 1024.0, BytesUnits);\r
     }\r
     else\r
@@ -99,7 +99,7 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
     // Files SizeOnDisk\r
     if (Fractional)\r
     {\r
-        swprintf (Text, L"%.2f %s", (double)(signed)((Report.FilesSizeBytes + Report.FilesSlackBytes) / \r
+        swprintf (Text, L"%.2f %s", (double)(signed)((Report.FilesSizeBytes + Report.FilesSlackBytes) /\r
             (BytesDivisor / 1024)) / 1024.0, BytesUnits);\r
     }\r
     else\r
@@ -107,14 +107,14 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
         AddCommas (Text, (Report.FilesSizeBytes + Report.FilesSlackBytes) / (uint64)BytesDivisor);\r
         wcscat (Text, L" ");\r
         wcscat (Text, BytesUnits);\r
-       \r
+\r
     }\r
     SetDlgItemText (Dlg, IDC_FILESSIZEONDISK, Text);\r
 \r
     // FilesSlackBytes\r
     if (Fractional)\r
     {\r
-        swprintf (Text, L"%.2f %s", (double)(signed)(Report.FilesSlackBytes / \r
+        swprintf (Text, L"%.2f %s", (double)(signed)(Report.FilesSlackBytes /\r
             (BytesDivisor / 1024)) / 1024.0, BytesUnits);\r
     }\r
     else\r
@@ -141,7 +141,7 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
 \r
     if (PFRec)\r
     {\r
-        swprintf \r
+        swprintf\r
         (\r
             Text2,\r
             L"%.2f%% of the files on this volume are fragmented. ",\r
@@ -174,9 +174,9 @@ void SetReportInfo (HWND Dlg, DefragReport &Report, uint32 BytesDivisor, wchar_t
     // Should we recommend a smaller cluster size?\r
     if (Report.PercentSlack >= 10.0f)\r
     {\r
-        swprintf \r
+        swprintf\r
         (\r
-            Text2, \r
+            Text2,\r
             L"\n* A large amount of disk space (%.2f%%) is being lost "\r
             L"due to a large (%u bytes) cluster size. It is recommended "\r
             L"that you use a disk utility such as Partition Magic to "\r
index dcf9bf4..320e7c3 100644 (file)
@@ -23,7 +23,7 @@ bool CheckWinVer (void)
     ZeroMemory (&OSVersion, sizeof (OSVersion));\r
     OSVersion.dwOSVersionInfoSize = sizeof (OSVersion);\r
     GetVersionEx (&OSVersion);\r
-    \r
+\r
     // Need Windows 2000!\r
 \r
     // Check for NT first\r
@@ -246,7 +246,7 @@ int wmain (int argc, wchar_t **argv)
         for (size_t d = 0; d < Drives.size (); d++)\r
         {\r
             if (!Defrags[d]->IsDoneYet()  &&  !Defrags[d]->HasError())\r
-                Continue = true;                \r
+                Continue = true;\r
         }\r
     }\r
 \r
@@ -336,7 +336,7 @@ int wmain (int argc, wchar_t **argv)
                         if (Info.Attributes.Unmovable == 1)\r
                             wprintf (L"unmovable, ");\r
 \r
-                        wprintf (L"%I64u bytes, %I64u bytes on disk, %I64u bytes slack, %u fragments\n", \r
+                        wprintf (L"%I64u bytes, %I64u bytes on disk, %I64u bytes slack, %u fragments\n",\r
                             Info.Size, Used, Slack, Info.Fragments.size());\r
                     }\r
                 }\r
index c98399e..673c369 100644 (file)
@@ -40,7 +40,7 @@
 #define IDC_PRIORITY_LIST               1057\r
 \r
 // Next default values for new objects\r
-// \r
+//\r
 #ifdef APSTUDIO_INVOKED\r
 #ifndef APSTUDIO_READONLY_SYMBOLS\r
 #define _APS_NEXT_RESOURCE_VALUE        118\r
index 773ea65..a8bfd22 100644 (file)
@@ -30,7 +30,7 @@ enum
        GETTYPE_BUILD   = 0x080
 };
 
-INT 
+INT
 GetVersionNumber(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
 {
        INT VersionNumber = 255;
@@ -40,7 +40,7 @@ GetVersionNumber(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
                VersionNumber += (pBuf102->sv102_version_minor * 100);
        }
        else if(bLocal)
-       {               
+       {
                VersionNumber = osvi->dwMajorVersion * 1000;
                VersionNumber += (osvi->dwMinorVersion * 100);
        }
@@ -48,7 +48,7 @@ GetVersionNumber(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
        return VersionNumber;
 }
 
-INT 
+INT
 GetMajValue(BOOL Major, BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
 {
        INT VersionNumber = 255;
@@ -69,7 +69,7 @@ GetMajValue(BOOL Major, BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 p
        return VersionNumber;
 }
 
-INT 
+INT
 GetSystemRole(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
 {
 
@@ -96,7 +96,7 @@ GetSystemRole(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
 
 }
 
-INT 
+INT
 GetServicePack(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102, TCHAR * Server)
 {
        INT SPNumber = 255;
@@ -111,7 +111,7 @@ GetServicePack(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102, T
        return SPNumber;
 }
 
-INT 
+INT
 GetBuildNumber(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
 {
        INT BuildNum = 255;
@@ -147,7 +147,7 @@ INT GetType(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
                                        return 5;
                                else if(osvi->wSuiteMask & VER_SUITE_ENTERPRISE)
                                        return 4;
-                               else 
+                               else
                                        return 3;
                        }
                }
@@ -159,7 +159,7 @@ INT GetType(BOOL bLocal, LPOSVERSIONINFOEX osvi, LPSERVER_INFO_102 pBuf102)
        return 255;
 }
 
-VOID 
+VOID
 GetBasicInfo(LPOSVERSIONINFOEX osvi, TCHAR * HostName, TCHAR * OSName, TCHAR * Version, TCHAR * Role, TCHAR * Components)
 {
        /* Host Name - COMPUTERNAME*/
@@ -191,7 +191,7 @@ GetBasicInfo(LPOSVERSIONINFOEX osvi, TCHAR * HostName, TCHAR * OSName, TCHAR * V
        {
                _tcscpy(OSName, _T("Microsoft Windows Vista "));
        }
-       else 
+       else
        {
                _tcscpy(OSName, _T("Microsoft Windows "));
        }
index 6851442..618dbb4 100644 (file)
@@ -144,7 +144,7 @@ ScreenAddDevice(
        {
                DPRINT("Attaching to old blue\n");
 
-               /* Suggested by hpoussin .. Hide previous blue device 
+               /* Suggested by hpoussin .. Hide previous blue device
                 * This makes us able to coexist with blue, and install
                 * when loaded */
                Status = IoCreateDevice(
index da58637..9154692 100644 (file)
@@ -438,7 +438,7 @@ DisplaySharpness(HWND hwnd,
 \r
             /* Green */\r
             c1 = g;\r
-            if ((Count < ((bitmap.bmHeight - 1)* bitmap.bmWidth * 4lu)) && \r
+            if ((Count < ((bitmap.bmHeight - 1)* bitmap.bmWidth * 4lu)) &&\r
                 (Count > (bitmap.bmWidth * 4lu)))\r
             {\r
                 CopyMemory(&Val, &pBits[(Count - (bitmap.bmWidth * 4l))], 4);\r
@@ -458,7 +458,7 @@ DisplaySharpness(HWND hwnd,
 \r
             /* Blue */\r
             c1 = b;\r
-            if ((Count < ((bitmap.bmHeight - 1) * bitmap.bmWidth * 4lu)) && \r
+            if ((Count < ((bitmap.bmHeight - 1) * bitmap.bmWidth * 4lu)) &&\r
                 (Count > (bitmap.bmWidth * 4lu)))\r
             {\r
                 CopyMemory(&Val, &pBits[(Count - (bitmap.bmWidth * 4l))], 4);\r
index ec5cff6..1412791 100644 (file)
@@ -4,32 +4,32 @@
 LIBRARY DFLAT32.DLL
 
 EXPORTS
-DfCreateWindow         
-DfInitialize                    ;message.c             
+DfCreateWindow
+DfInitialize                    ;message.c
 DfPostMessage                   ;message.c
 DfSendMessage                   ;message.c
 DfDispatchMessage               ;message.c
 handshake                       ;message.c
 TestCriticalError              ;stubs.c
-;DefaultWndProc         
-;BaseWndProc            
-;WindowHeight           
-;WindowWidth            
-;ClientWidth            
-;ClientHeight           
-;GetTop                        
-;GetBottom             
-;GetLeft                       
-;GetRight              
-;GetClientTop          
-;GetClientBottom               
-;GetClientLeft         
-;GetClientRight                
-;GetParent             
+;DefaultWndProc
+;BaseWndProc
+;WindowHeight
+;WindowWidth
+;ClientWidth
+;ClientHeight
+;GetTop
+;GetBottom
+;GetLeft
+;GetRight
+;GetClientTop
+;GetClientBottom
+;GetClientLeft
+;GetClientRight
+;GetParent
 ;FirstWindow
-;LastWindow 
+;LastWindow
 ;NextWindow
-;PrevWindow 
+;PrevWindow
 CharInView
 ;TopBorderAdj
 ;BorderAdj
index d279db3..0c39116 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: dflat32.rc,v 1.3 2004/10/16 22:30:17 gvg Exp $ */
+/* $Id$ */
 
 #define REACTOS_VERSION_DLL
 #define REACTOS_STR_FILE_DESCRIPTION   "dflat32 console windowing library\0"
index 7fc354f..1c3f717 100644 (file)
@@ -6,7 +6,7 @@
  * conjunction with the documentation file libjpeg.doc.
  *
  * This code will not do anything useful as-is, but it may be helpful as a
- * skeleton for constructing routines that call the JPEG library.  
+ * skeleton for constructing routines that call the JPEG library.
  *
  * We present these routines in the same coding style used in the JPEG code
  * (ANSI function definitions, etc); but you are of course free to code your
@@ -356,7 +356,7 @@ read_JPEG_file (char * filename)
    * output image dimensions available, as well as the output colormap
    * if we asked for color quantization.
    * In this example, we need to make an output work buffer of the right size.
-   */ 
+   */
   /* JSAMPLEs per row in output buffer */
   row_stride = cinfo.output_width * cinfo.output_components;
   /* Make a one-row-high sample array that will go away when done with image */
index 54fb8c5..6fe3085 100644 (file)
@@ -36,7 +36,7 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
   if (version != JPEG_LIB_VERSION)
     ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
   if (structsize != SIZEOF(struct jpeg_compress_struct))
-    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
+    ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE,
             (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
 
   /* For debugging purposes, we zero the whole master structure.
index f235250..08e2119 100644 (file)
@@ -204,7 +204,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
       (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                  SIZEOF(c_derived_tbl));
   dtbl = *pdtbl;
-  
+
   /* Figure C.1: make table of Huffman code length for each symbol */
 
   p = 0;
@@ -217,7 +217,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
   }
   huffsize[p] = 0;
   lastp = p;
-  
+
   /* Figure C.2: generate the codes themselves */
   /* We also validate that the counts represent a legal Huffman code tree. */
 
@@ -237,7 +237,7 @@ jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno,
     code <<= 1;
     si++;
   }