Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lexborisov/Modest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorlexborisov <lex.borisov@gmail.com>2017-02-14 14:49:05 +0300
committerlexborisov <lex.borisov@gmail.com>2017-02-14 14:49:05 +0300
commit5fa9d6272b8c58dec084733295edef83074d6eae (patch)
tree676a65501607480920fd62e152217cb50f0e420a /devel
parent626fef0d6a19c18e42be7f5f3288107b943c0b21 (diff)
Big update. See CHANGELOG
Diffstat (limited to 'devel')
-rw-r--r--devel/osx/Modest.xcodeproj/project.pbxproj18
-rw-r--r--devel/osx/Modest.xcodeproj/project.xcworkspace/xcuserdata/alexanderborisov.xcuserdatad/UserInterfaceState.xcuserstatebin122809 -> 134284 bytes
-rw-r--r--devel/osx/Modest.xcodeproj/xcuserdata/alexanderborisov.xcuserdatad/xcschemes/Modest.xcscheme1
-rw-r--r--devel/osx/Modest/main.c34
4 files changed, 31 insertions, 22 deletions
diff --git a/devel/osx/Modest.xcodeproj/project.pbxproj b/devel/osx/Modest.xcodeproj/project.pbxproj
index 547b2a6..7ee968f 100644
--- a/devel/osx/Modest.xcodeproj/project.pbxproj
+++ b/devel/osx/Modest.xcodeproj/project.pbxproj
@@ -19,6 +19,7 @@
0E0C91991DB107E7007A0501 /* property.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C91971DB107E7007A0501 /* property.c */; };
0E0C919C1DB10866007A0501 /* raw_property.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C919A1DB10866007A0501 /* raw_property.c */; };
0E0D5D011E003A5E00EBFDD6 /* avl_tree.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E0D5CFF1E003A5E00EBFDD6 /* avl_tree.c */; };
+ 0E0D738C1E2F67DB00FC97DE /* mhash.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E0D738A1E2F67DB00FC97DE /* mhash.c */; };
0E4B525C1DC13BBB0095026A /* parser_text_decoration.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E4B525A1DC13BBB0095026A /* parser_text_decoration.c */; };
0E5AA4BD1DA9689700FF5358 /* shared.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E5AA4BB1DA9689700FF5358 /* shared.c */; };
0E5E2AAB1DC53CC1007836AB /* entry_destroy.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E5E2AA91DC53CC1007836AB /* entry_destroy.c */; };
@@ -168,6 +169,8 @@
0E0C919B1DB10866007A0501 /* raw_property.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = raw_property.h; path = ../../../source/modest/node/raw_property.h; sourceTree = "<group>"; };
0E0D5CFF1E003A5E00EBFDD6 /* avl_tree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = avl_tree.c; sourceTree = "<group>"; };
0E0D5D001E003A5E00EBFDD6 /* avl_tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = avl_tree.h; sourceTree = "<group>"; };
+ 0E0D738A1E2F67DB00FC97DE /* mhash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mhash.c; sourceTree = "<group>"; };
+ 0E0D738B1E2F67DB00FC97DE /* mhash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mhash.h; sourceTree = "<group>"; };
0E4B525A1DC13BBB0095026A /* parser_text_decoration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = parser_text_decoration.c; sourceTree = "<group>"; };
0E5AA4BB1DA9689700FF5358 /* shared.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = shared.c; sourceTree = "<group>"; };
0E5AA4BC1DA9689700FF5358 /* shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shared.h; sourceTree = "<group>"; };
@@ -545,14 +548,14 @@
0E750FC91D9AF27F00337E9B /* thread.c */,
0E750FCC1D9AF27F00337E9B /* token.h */,
0E750FCB1D9AF27F00337E9B /* token.c */,
+ 0E750FD41D9AF27F00337E9B /* tokenizer.h */,
+ 0E750FD31D9AF27F00337E9B /* tokenizer.c */,
0E750FCE1D9AF27F00337E9B /* tokenizer_doctype.h */,
0E750FCD1D9AF27F00337E9B /* tokenizer_doctype.c */,
0E750FD01D9AF27F00337E9B /* tokenizer_end.h */,
0E750FCF1D9AF27F00337E9B /* tokenizer_end.c */,
0E750FD21D9AF27F00337E9B /* tokenizer_script.h */,
0E750FD11D9AF27F00337E9B /* tokenizer_script.c */,
- 0E750FD41D9AF27F00337E9B /* tokenizer.h */,
- 0E750FD31D9AF27F00337E9B /* tokenizer.c */,
0E750FD61D9AF27F00337E9B /* tree.h */,
0E750FD51D9AF27F00337E9B /* tree.c */,
0E750FE61D9AF27F00337E9B /* utils.h */,
@@ -687,11 +690,11 @@
0E750F391D9AF27200337E9B /* media */ = {
isa = PBXGroup;
children = (
- 0E750F3A1D9AF27200337E9B /* init.c */,
- 0E750F3B1D9AF27200337E9B /* init.h */,
0E750F3C1D9AF27200337E9B /* myosi.h */,
- 0E750F3D1D9AF27200337E9B /* state.c */,
+ 0E750F3B1D9AF27200337E9B /* init.h */,
+ 0E750F3A1D9AF27200337E9B /* init.c */,
0E750F3E1D9AF27200337E9B /* state.h */,
+ 0E750F3D1D9AF27200337E9B /* state.c */,
);
name = media;
path = ../../source/mycss/media;
@@ -801,8 +804,10 @@
0E750FD71D9AF27F00337E9B /* utils */ = {
isa = PBXGroup;
children = (
- 0E0D5CFF1E003A5E00EBFDD6 /* avl_tree.c */,
+ 0E0D738B1E2F67DB00FC97DE /* mhash.h */,
+ 0E0D738A1E2F67DB00FC97DE /* mhash.c */,
0E0D5D001E003A5E00EBFDD6 /* avl_tree.h */,
+ 0E0D5CFF1E003A5E00EBFDD6 /* avl_tree.c */,
0E750FD91D9AF27F00337E9B /* mchar_async.h */,
0E750FD81D9AF27F00337E9B /* mchar_async.c */,
0E750FDA1D9AF27F00337E9B /* mcobject.c */,
@@ -959,6 +964,7 @@
0E750F251D9AF26300337E9B /* vmtx.c in Sources */,
0E750F801D9AF27200337E9B /* an_plus_b.c in Sources */,
0E750FEF1D9AF27F00337E9B /* myosi.c in Sources */,
+ 0E0D738C1E2F67DB00FC97DE /* mhash.c in Sources */,
0E750F9B1D9AF27200337E9B /* tokenizer_end.c in Sources */,
0E750F851D9AF27200337E9B /* parser.c in Sources */,
0E750F871D9AF27200337E9B /* entry.c in Sources */,
diff --git a/devel/osx/Modest.xcodeproj/project.xcworkspace/xcuserdata/alexanderborisov.xcuserdatad/UserInterfaceState.xcuserstate b/devel/osx/Modest.xcodeproj/project.xcworkspace/xcuserdata/alexanderborisov.xcuserdatad/UserInterfaceState.xcuserstate
index 33b97dc..023649e 100644
--- a/devel/osx/Modest.xcodeproj/project.xcworkspace/xcuserdata/alexanderborisov.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/devel/osx/Modest.xcodeproj/project.xcworkspace/xcuserdata/alexanderborisov.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/devel/osx/Modest.xcodeproj/xcuserdata/alexanderborisov.xcuserdatad/xcschemes/Modest.xcscheme b/devel/osx/Modest.xcodeproj/xcuserdata/alexanderborisov.xcuserdatad/xcschemes/Modest.xcscheme
index 2fcec69..448dc8b 100644
--- a/devel/osx/Modest.xcodeproj/xcuserdata/alexanderborisov.xcuserdatad/xcschemes/Modest.xcscheme
+++ b/devel/osx/Modest.xcodeproj/xcuserdata/alexanderborisov.xcuserdatad/xcschemes/Modest.xcscheme
@@ -49,6 +49,7 @@
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
+ enableAddressSanitizer = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
diff --git a/devel/osx/Modest/main.c b/devel/osx/Modest/main.c
index 30145fe..aea9220 100644
--- a/devel/osx/Modest/main.c
+++ b/devel/osx/Modest/main.c
@@ -79,7 +79,13 @@ myhtml_tree_t * myhtml(const char* data, size_t data_size, bool is_file, bool pr
if(is_file) {
struct res_data res = load_data(data);
- myhtml_parse(tree, MyHTML_ENCODING_UTF_8, res.data, res.size);
+
+ myhtml_encoding_t encoding = myhtml_encoding_prescan_stream_to_determine_encoding(res.data, res.size);
+
+ if(encoding == MyHTML_ENCODING_NOT_DETERMINED)
+ encoding = MyHTML_ENCODING_UTF_8;
+
+ myhtml_parse(tree, encoding, res.data, res.size);
free(res.data);
}
else {
@@ -199,13 +205,16 @@ void modest_callback_for_create_mnode(myhtml_tree_t* tree, myhtml_tree_node_t* n
int main(int argc, const char * argv[]) {
setbuf(stdout, NULL);
+ //char *html_f = "/new/C-git/lexbor/test/test.html";
char *html_f = "/new/C-git/habr/1.html";
+ //char *html_f = "/new/C-git/HTML_BENTCHMARK/booking.com.html";
+
//char *css_f = "/new/C-git/habr/1_glob.css";
char *css_f = "/new/C-git/CSS_BENCHMARK/baseguide.css";
//char *css_f = "/new/C-git/bootstrap.css";
- char *html = "<fff>sdsd<aaaa id=hash class=best><div a1><menu class=\"lalala\" id=\"menu-id\" b1><span span1><div a2></div></div><menu class=\"be\" id=\"menu\" b1><span span2></aaaa><a href=\"\" sec></a><div div1><div div2></div><div div3></div><div div4></div></div><p p1><p p2><p p3><p p4>";
+ char *html = "Привет UTF8! <br><br>";
char *css = ".radio input[type=\"radio\"]:checked + label::before {} .checkbox input[type=\"checkbox\"]:checked + label::before {}";
char *selector = "menu";
@@ -214,10 +223,10 @@ int main(int argc, const char * argv[]) {
modest_init(modest);
myhtml_tree_t *myhtml_tree = myhtml(html_f, strlen(html_f), true, false, modest_callback_for_create_mnode, (void*)modest);
- mycss_entry_t *mycss_entry = mycss(css_f, strlen(css_f), true, true);
+ mycss_entry_t *mycss_entry = mycss(css_f, strlen(css_f), true, false);
// myhtml_tree_t *myhtml_tree = myhtml(html, strlen(html), false, true, modest_callback_for_create_mnode, (void*)modest);
-// mycss_entry_t *mycss_entry = mycss(css, strlen(css), false, true);
+// mycss_entry_t *mycss_entry = mycss(css, strlen(css), false, false);
modest->myhtml_tree = myhtml_tree;
modest->mycss_entry = mycss_entry;
@@ -230,10 +239,6 @@ int main(int argc, const char * argv[]) {
-
-
-
-
/* full api */
uint64_t parse_start = myhtml_hperf_clock(NULL);
@@ -241,19 +246,19 @@ int main(int argc, const char * argv[]) {
modest_finder_t* finder = modest_finder_create();
modest_finder_init(finder);
- /* threads */
+// threads
modest_finder_thread_t *finder_thread = modest_finder_thread_create();
modest_finder_thread_init(finder, finder_thread, 4);
- modest_finder_thread_process(modest, finder_thread, myhtml_tree, myhtml_tree->node_html, stylesheet->sel_list_first);
+ modest_finder_thread_process(modest, finder_thread, myhtml_tree->node_html, stylesheet->sel_list_first);
- //finder_thread = modest_finder_thread_destroy(finder_thread, true);
- //finder = modest_finder_destroy(finder, true);
+ finder_thread = modest_finder_thread_destroy(finder_thread, true);
+ finder = modest_finder_destroy(finder, true);
uint64_t parse_stop = myhtml_hperf_clock(NULL);
- //print_tree_after_all(modest, myhtml_tree, myhtml_tree->node_html, mycss_entry);
+// print_tree_after_all(modest, myhtml_tree, myhtml_tree->node_html, mycss_entry);
printf("\n\n------------\nInformation:\n");
printf("\tTicks/sec: %llu\n", (unsigned long long) myhtml_hperf_res(NULL));
@@ -289,6 +294,3 @@ int main(int argc, const char * argv[]) {
-
-
-