Rev 7434 | Rev 7444 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7434 | Rev 7437 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | int NOTES::OpenTxt(dword file_path) |
51 | int NOTES::OpenTxt(dword file_path) |
52 | { |
52 | { |
53 | int i=0, linepos=0; |
53 | int i=0, linepos=0; |
54 | int item_n=-1; |
54 | int item_n=-1; |
Line -... | Line 55... | ||
- | 55 | ||
- | 56 | count = LINES_COUNT; |
|
55 | 57 | ||
56 | strcpy(#txt_path, file_path); |
58 | strcpy(#txt_path, file_path); |
57 | ReadFile(0, 4096, #txt_data, #txt_path); |
59 | ReadFile(0, 4096, #txt_data, #txt_path); |
58 | if (!txt_data) || (strncmp(#txt_data, "notes", 5)!=0) |
60 | if (!txt_data) || (strncmp(#txt_data, "notes", 5)!=0) |
59 | { |
61 | { |
60 | txt_file_exists = false; |
- | |
61 | notify("'Notes\nData file does not exists or is not valid' -tE"); |
62 | txt_file_exists = false; |
62 | return 0; |
63 | return 0; |
63 | } |
64 | } |
64 | else |
65 | else |
65 | { |
66 | { |
Line 82... | Line 83... | ||
82 | while (item_n < LINES_COUNT) |
83 | while (item_n < LINES_COUNT) |
83 | { |
84 | { |
84 | //lines[item_n].Delete(); |
85 | //lines[item_n].Delete(); |
85 | item_n++; |
86 | item_n++; |
86 | } |
87 | } |
87 | count = LINES_COUNT; |
- | |
88 | return 1; |
88 | return 1; |
89 | } |
89 | } |
90 | } |
90 | } |
Line 91... | Line 91... | ||
91 | 91 |