Commit fbe035677780d90d1fce8b0468eb605b4c2c68a1
1 parent
ff1a2265
Exists in
master
and in
5 other branches
Ajustes diversos feitos quando o servidor svn estava fora
Showing
6 changed files
with
37 additions
and
52 deletions
Show diff stats
configure.ac
| ... | ... | @@ -331,6 +331,7 @@ AC_CHECK_HEADER(malloc.h, AC_DEFINE(HAVE_MALLOC_H,,[do we have malloc.h?])) |
| 331 | 331 | |
| 332 | 332 | AC_CHECK_FUNCS(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO) ) |
| 333 | 333 | AC_CHECK_FUNC(vasprintf, AC_DEFINE(HAVE_VASPRINTF) ) |
| 334 | +AC_CHECK_FUNC(strtok_r, AC_DEFINE(HAVE_STRTOK_R) ) | |
| 334 | 335 | |
| 335 | 336 | PKG_CHECK_EXISTS |
| 336 | 337 | |
| ... | ... | @@ -402,18 +403,15 @@ if test -z "${REXX_HOME}"; then |
| 402 | 403 | |
| 403 | 404 | PKG_CHECK_MODULES( [REXX], [ooRexx], app_cv_rexx=yes, AC_MSG_NOTICE([No ooRexx on pkg-config.]) ) |
| 404 | 405 | |
| 405 | - if test "$app_cv_rexx" != "yes"; then | |
| 406 | - | |
| 407 | - if test "$REXXCONFIG" != "no"; then | |
| 408 | - app_cv_rexx=yes | |
| 409 | - REXX_CFLAGS=`$REXXCONFIG --cflags` | |
| 410 | - REXX_LIBS=`$REXXCONFIG --libs` | |
| 411 | - REXX_HOME=`$REXXCONFIG --prefix`/share/ooRexx | |
| 412 | - AC_MSG_NOTICE([Got settings from oorexx-config.]) | |
| 413 | - else | |
| 414 | - AC_MSG_NOTICE([ooRexx SDK is NOT available.]) | |
| 415 | - app_cv_rexx="no" | |
| 416 | - fi | |
| 406 | + if test "$REXXCONFIG" != "no"; then | |
| 407 | + app_cv_rexx=yes | |
| 408 | + REXX_CFLAGS=`$REXXCONFIG --cflags` | |
| 409 | + REXX_LIBS=`$REXXCONFIG --libs` | |
| 410 | + REXX_HOME=`$REXXCONFIG --prefix`/share/ooRexx | |
| 411 | + AC_MSG_NOTICE([Got settings from oorexx-config.]) | |
| 412 | + else | |
| 413 | + AC_MSG_NOTICE([ooRexx SDK is NOT available.]) | |
| 414 | + app_cv_rexx="no" | |
| 417 | 415 | fi |
| 418 | 416 | |
| 419 | 417 | else |
| ... | ... | @@ -486,16 +484,16 @@ fi |
| 486 | 484 | # Setup c++ compiler flags |
| 487 | 485 | if test -d "$prefix/include/libreoffice"; then |
| 488 | 486 | OO_CXXFLAGS="$OO_CXXFLAGS -I$prefix/include/libreoffice" |
| 489 | - AC_MSG_NOTICE([Found libreoffice includes at $prefix/include/libreoffice]) | |
| 487 | + AC_MSG_NOTICE([Found libreoffice includes at $prefix/include/libreoffice]) | |
| 490 | 488 | elif test -d "/usr/include/libreoffice"; then |
| 491 | 489 | OO_CXXFLAGS="$OO_CXXFLAGS -I/usr/include/libreoffice" |
| 492 | - AC_MSG_NOTICE([Found libreoffice includes at /usr/include/libreoffice]) | |
| 490 | + AC_MSG_NOTICE([Found libreoffice includes at /usr/include/libreoffice]) | |
| 493 | 491 | elif test -d "$OO_SDK_HOME/include"; then |
| 494 | 492 | OO_CXXFLAGS="$OO_CXXFLAGS -I$OO_SDK_HOME/include" |
| 495 | - AC_MSG_NOTICE([Found libreoffice includes at $OO_SDK_HOME/include]) | |
| 493 | + AC_MSG_NOTICE([Found libreoffice includes at $OO_SDK_HOME/include]) | |
| 496 | 494 | else |
| 497 | 495 | app_cv_office="no" |
| 498 | - AC_MSG_NOTICE([Can't libreoffice includes]) | |
| 496 | + AC_MSG_NOTICE([Can't libreoffice includes]) | |
| 499 | 497 | fi |
| 500 | 498 | |
| 501 | 499 | OO_CXXFLAGS="-DCPPU_ENV=gcc3 -Wno-strict-aliasing $OO_CXXFLAGS" |
| ... | ... | @@ -503,16 +501,16 @@ OO_CXXFLAGS="-DCPPU_ENV=gcc3 -Wno-strict-aliasing $OO_CXXFLAGS" |
| 503 | 501 | # Test for IDL files |
| 504 | 502 | if test -d "$OO_SDK_HOME/idl"; then |
| 505 | 503 | IDLDIR="$OO_SDK_HOME/idl" |
| 506 | - AC_MSG_NOTICE([Found idl at $IDLDIR]) | |
| 504 | + AC_MSG_NOTICE([Found idl at $IDLDIR]) | |
| 507 | 505 | elif test -d "/usr/share/idl/libreoffice"; then |
| 508 | 506 | IDLDIR="/usr/share/idl/libreoffice" |
| 509 | - AC_MSG_NOTICE([Found idl at $IDLDIR]) | |
| 507 | + AC_MSG_NOTICE([Found idl at $IDLDIR]) | |
| 510 | 508 | elif test -d "$libdir/libreoffice/sdk/idl"; then |
| 511 | 509 | IDLDIR="$libdir/libreoffice/sdk/idl" |
| 512 | - AC_MSG_NOTICE([Found idl at $IDLDIR]) | |
| 510 | + AC_MSG_NOTICE([Found idl at $IDLDIR]) | |
| 513 | 511 | else |
| 514 | 512 | app_cv_office="no" |
| 515 | - AC_MSG_NOTICE([Can't find idl path]) | |
| 513 | + AC_MSG_NOTICE([Can't find idl path]) | |
| 516 | 514 | fi |
| 517 | 515 | |
| 518 | 516 | OO_SDK_URE_BIN_DIR=$OO_SDK_URE_HOME/bin |
| ... | ... | @@ -559,7 +557,7 @@ if test "$app_cv_office" == "yes" ; then |
| 559 | 557 | AC_MSG_NOTICE([libreoffice sdk is present.]) |
| 560 | 558 | EXTENSIONS="$EXTENSIONS oxt" |
| 561 | 559 | else |
| 562 | - AC_MSG_NOTICE([libreoffice sdk is NOT present.]) | |
| 560 | + AC_MSG_NOTICE([libreoffice sdk is NOT present or disabled.]) | |
| 563 | 561 | fi |
| 564 | 562 | |
| 565 | 563 | AC_SUBST(OFFICE_HOME) | ... | ... |
po/pt_BR.po
| ... | ... | @@ -5,7 +5,7 @@ msgid "" |
| 5 | 5 | msgstr "" |
| 6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
| 7 | 7 | "Report-Msgid-Bugs-To: \n" |
| 8 | -"POT-Creation-Date: 2014-04-01 10:24-0300\n" | |
| 8 | +"POT-Creation-Date: 2014-04-07 08:52-0300\n" | |
| 9 | 9 | "PO-Revision-Date: 2014-02-17 08:05-0300\n" |
| 10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
| 11 | 11 | "Language-Team: Portugues <>\n" | ... | ... |
src/classlib/remote.cc
| ... | ... | @@ -129,11 +129,11 @@ |
| 129 | 129 | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - string * query_string(void *query, size_t szQuery, size_t len) | |
| 132 | + string query_string(void *query, size_t szQuery, size_t len) | |
| 133 | 133 | { |
| 134 | 134 | struct hllapi_packet_text * response; |
| 135 | 135 | DWORD cbSize = sizeof(struct hllapi_packet_text)+len; |
| 136 | - string * s; | |
| 136 | + string s; | |
| 137 | 137 | |
| 138 | 138 | response = (struct hllapi_packet_text *) malloc(cbSize+2); |
| 139 | 139 | memset(response,0,cbSize+2); |
| ... | ... | @@ -141,13 +141,7 @@ |
| 141 | 141 | if(TransactNamedPipe(hPipe,(LPVOID) query, szQuery, &response, cbSize, &cbSize,NULL)) |
| 142 | 142 | { |
| 143 | 143 | if(response->packet_id) |
| 144 | - s = new string(""); | |
| 145 | - else | |
| 146 | - s = new string(response->text); | |
| 147 | - } | |
| 148 | - else | |
| 149 | - { | |
| 150 | - s = new string(""); | |
| 144 | + s.assign(response->text); | |
| 151 | 145 | } |
| 152 | 146 | |
| 153 | 147 | free(response); | ... | ... |
src/include/lib3270/config.h.in
src/lib3270/host.c
| ... | ... | @@ -283,10 +283,14 @@ LIB3270_EXPORT const char * lib3270_set_url(H3270 *h, const char *n) |
| 283 | 283 | if(query && *query) |
| 284 | 284 | { |
| 285 | 285 | char *str = strdup(query); |
| 286 | - char *saveptr = NULL; | |
| 287 | 286 | char *ptr; |
| 288 | 287 | |
| 288 | +#ifdef HAVE_STRTOK_R | |
| 289 | + char *saveptr = NULL; | |
| 289 | 290 | for(ptr = strtok_r(str,"&",&saveptr);ptr;ptr=strtok_r(NULL,"&",&saveptr)) |
| 291 | +#else | |
| 292 | + for(ptr = strtok(str,"&");ptr;ptr=strtok(NULL,"&")) | |
| 293 | +#endif | |
| 290 | 294 | { |
| 291 | 295 | char *var = ptr; |
| 292 | 296 | char *val = strchr(ptr,'='); | ... | ... |
src/plugins/hllapi/calls.cc
| ... | ... | @@ -174,12 +174,8 @@ |
| 174 | 174 | try |
| 175 | 175 | { |
| 176 | 176 | size_t sz = strlen(buffer); |
| 177 | - string * str = session::get_default()->get_string_at(row,col,sz); | |
| 178 | - if(str) | |
| 179 | - { | |
| 180 | - strncpy(buffer,str->c_str(),sz); | |
| 181 | - delete str; | |
| 182 | - } | |
| 177 | + string str = session::get_default()->get_string_at(row,col,sz); | |
| 178 | + strncpy(buffer,str.c_str(),sz); | |
| 183 | 179 | } |
| 184 | 180 | catch(std::exception &e) |
| 185 | 181 | { |
| ... | ... | @@ -275,13 +271,9 @@ |
| 275 | 271 | if(len < szBuffer && len > 0) |
| 276 | 272 | szBuffer = len; |
| 277 | 273 | |
| 278 | - string *str = session::get_default()->get_string(offset,szBuffer); | |
| 279 | - if(str) | |
| 280 | - { | |
| 281 | - strncpy(buffer,str->c_str(),szBuffer); | |
| 282 | - delete str; | |
| 283 | - rc = HLLAPI_STATUS_SUCCESS; | |
| 284 | - } | |
| 274 | + string str = session::get_default()->get_string(offset,szBuffer); | |
| 275 | + strncpy(buffer,str.c_str(),szBuffer); | |
| 276 | + rc = HLLAPI_STATUS_SUCCESS; | |
| 285 | 277 | } |
| 286 | 278 | catch(std::exception &e) |
| 287 | 279 | { |
| ... | ... | @@ -312,13 +304,9 @@ |
| 312 | 304 | { |
| 313 | 305 | try |
| 314 | 306 | { |
| 315 | - string *str = session::get_default()->get_string(offset-1,len); | |
| 316 | - if(str) | |
| 317 | - { | |
| 318 | - char * ret = strdup(str->c_str()); | |
| 319 | - delete str; | |
| 320 | - return ret; | |
| 321 | - } | |
| 307 | + string str = session::get_default()->get_string(offset-1,len); | |
| 308 | + char * ret = strdup(str.c_str()); | |
| 309 | + return ret; | |
| 322 | 310 | } |
| 323 | 311 | catch(std::exception &e) |
| 324 | 312 | { | ... | ... |