Commit 841c5d320b83b707ce07251efd67debd0af15b2f

Authored by perry.werneck@gmail.com
1 parent bfa31c77

Implementando conversão do buffer de terminal para HTML

Showing 1 changed file with 19 additions and 0 deletions   Show diff stats
src/lib3270/html.c
@@ -256,7 +256,26 @@ @@ -256,7 +256,26 @@
256 if(!FA_IS_PROTECTED(fa)) 256 if(!FA_IS_PROTECTED(fa))
257 { 257 {
258 // Input field 258 // Input field
  259 + char *text = lib3270_get_field_at(session,baddr+col+1);
  260 +
259 open_input(&info,baddr+col+1); 261 open_input(&info,baddr+col+1);
  262 +
  263 + if(text)
  264 + {
  265 + char *ptr = text;
  266 +
  267 + for(ptr = text; *ptr && (*ptr == ' ' || *ptr == '_'); ptr++);
  268 +
  269 + if(*ptr)
  270 + {
  271 + append_string(&info," value=\"");
  272 + append_string(&info,ptr);
  273 + append_string(&info,"\"");
  274 + }
  275 +
  276 + lib3270_free(text);
  277 + }
  278 +
260 } 279 }
261 else if(col < len && session->text[baddr+col+1].chr == 'F') 280 else if(col < len && session->text[baddr+col+1].chr == 'F')
262 { 281 {