From 1573cc53e5f1eaee8aa21635f0061e78b1246aae Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 27 Jan 2014 19:25:25 +0000 Subject: [PATCH] .uppdev git-svn-id: svn://ultimatepp.org/upp/trunk@6823 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppdev/GlDraw/test.qtf | 11 ++++++----- uppdev/Glyph/main.cpp | 2 ++ uppdev/UnZip/UnZip.cpp | 32 ++++++++++++++++++++++++++++++++ uppdev/UnZip/UnZip.upp | 20 ++++++++++---------- uppdev/UnZip/init | 2 +- 5 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 uppdev/UnZip/UnZip.cpp diff --git a/uppdev/GlDraw/test.qtf b/uppdev/GlDraw/test.qtf index 09e0394b9..bd2d9cd5c 100644 --- a/uppdev/GlDraw/test.qtf +++ b/uppdev/GlDraw/test.qtf @@ -17,16 +17,16 @@ and characters&] [s0; &] [s0; [*@4 . , ; ! ? % ( ) / < > #]&] [s0; &] -[s0; and bytes [* greater] than 127 are guaranteed to be never used as -command characters (not even in future versions of QTF). Other +[s0; and bytes [* greater] than 127 are guaranteed to be never used +as command characters (not even in future versions of QTF). Other characters should be prefixed with escape character `` (reverse apostrophe). Group of characters can be escaped using byte 1. Example:&] [s0; &] -[s1; `\"`\1a`[x`]`\1`[`* bold`]`\"&] +[s1; `\`"`\1a`[x`]`\1`[`* bold`]`\`"&] +[s0; Normal [* Bold] [/ Italic] [*/ Bold Italic] [_ Underline] [- Stroked]&] +[s0; Normal [* Bold] [/ Italic] [*/ Bold Italic] [_ Underline] [- Stroked]&] [s0; Normal [* Bold] [/ Italic] [*/ Bold Italic] [_ Underline] [- Stroked]&] -[Rs0; Normal [* Bold] [/ Italic] [*/ Bold Italic] [_ Underline] [- Stroked]&] -[Cs0; Normal [* Bold] [/ Italic] [*/ Bold Italic] [_ Underline] [- Stroked]&] [s0; Byte 0 represents the end of input sequence.&] [s0; &] [s0; Dimension units of QTF are dots `- one dot is defined as 1/600 @@ -66,3 +66,4 @@ with meaning&] :: [s0;%- [1 LtCyan]] :: [s0;%- [1 Yellow]]}}&] [s0; &] +[s0; ]] \ No newline at end of file diff --git a/uppdev/Glyph/main.cpp b/uppdev/Glyph/main.cpp index eefb6cd42..e85ca5b66 100644 --- a/uppdev/Glyph/main.cpp +++ b/uppdev/Glyph/main.cpp @@ -27,6 +27,8 @@ struct MyApp : TopWindow { Image MyApp::CursorImage(Point p, dword keyflags) { + return Image::Arrow(); + static Image img; ONCELOCK { SImageDraw w(64, 64); diff --git a/uppdev/UnZip/UnZip.cpp b/uppdev/UnZip/UnZip.cpp new file mode 100644 index 000000000..913dccf9c --- /dev/null +++ b/uppdev/UnZip/UnZip.cpp @@ -0,0 +1,32 @@ +#include +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + StdLogSetup(LOG_COUT|LOG_FILE); + FileIn in("/home/cxl/test.zip"); + + UnZip unzip(in); + + for(int i = 0; i < unzip.GetCount(); i++) + DDUMP(unzip.GetPath(i)); + + String outdir = GetHomeDirFile("zipout.tst"); + + DeleteFolderDeep(outdir); + + while(unzip) { + String path = AppendFileName(outdir, unzip.GetPath()); + DDUMP(path); + if(unzip.IsFolder()) { + RealizeDirectory(path); + unzip.Skip(); + } + else { + RealizePath(path); + SaveFile(path, unzip.ReadFile()); + } + } +} diff --git a/uppdev/UnZip/UnZip.upp b/uppdev/UnZip/UnZip.upp index 212d890fe..f8fbf47ed 100644 --- a/uppdev/UnZip/UnZip.upp +++ b/uppdev/UnZip/UnZip.upp @@ -1,10 +1,10 @@ -uses - Core, - plugin\zip; - -file - main.cpp; - -mainconfig - "" = ""; - +uses + Core, + plugin/zip; + +file + UnZip.cpp; + +mainconfig + "" = "SSE2"; + diff --git a/uppdev/UnZip/init b/uppdev/UnZip/init index 2c6b81f3b..09c4c2cbb 100644 --- a/uppdev/UnZip/init +++ b/uppdev/UnZip/init @@ -1,5 +1,5 @@ #ifndef _UnZip_icpp_init_stub #define _UnZip_icpp_init_stub #include "Core/init" -#include "plugin\zip/init" +#include "plugin/zip/init" #endif