Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:5f688bcc92b9, committed 2013-03-06
- Comitter:
- yaolu23
- Date:
- Wed Mar 06 18:17:39 2013 +0000
- Parent:
- 2:ff57d9a43c7d
- Commit message:
- BasicWeb
Changed in this revision
| BasicWeb.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BasicWeb.cpp Wed Mar 06 16:26:18 2013 +0000
+++ b/BasicWeb.cpp Wed Mar 06 18:17:39 2013 +0000
@@ -7,17 +7,17 @@
0, 0, 0, 0, 0,'q','1', 0, 0, 0,'z','s','a','w','2', 0, // 1
0,'c','x','d','e','4','3', 0, 0,' ','v','f','t','r','5', 0, // 2
0,'n','b','h','g','y','6', 0, 0, 0,'m','j','u','7','8', 0, // 3
- 0, 0,'k','i','o','0','9', 0, 0,'.','/','l',':','p', 0, 0, // 4
+ 0, 0,'k','i','o','0','9', 0, 0,'.','/','l',':','p','_', 0, // 4
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 5
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 7
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'-', 0, 0, 0, 0, // 7
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // 9
BasicWeb::BasicWeb(PinName tx, PinName rx, PinName reset)
:vga(tx, rx, reset),
urlStr("http://www.batw.net/htmllessons/example_page.html"),
- urlIndex(63), str(NULL), bold(false), font(0), color(0x000000), index(0), title(false) {
+ urlIndex(49), str(NULL), bold(false), font(0), color(0x000000), index(0), title(false) {
// initialize uVGA
vga.baudrate(115200);
@@ -237,7 +237,18 @@
/* stores string up to the start of the next tag into str variable */
bool BasicWeb::extractStr(){
+
+ // skip white space
int i = 0;
+ while(text[index+i] == ' ') i++;
+ index += i;
+
+ if(text[index+1] == '<'){
+ index++;
+ return true;
+ }
+
+ i = 0;
while(text[index+i] != '<' && text[index+i] != '\0'){
i++;
}