diff --git a/Makefile.in b/Makefile.in index 6cfe9aa..ea83993 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,7 +52,7 @@ BINDIR=.bin EXEEXT=@EXEEXT@ DBGLIB=-L../../$(BINDIR)/Debug@DLLDIR@ -l3270 RLSLIB=-L../../$(BINDIR)/Release@DLLDIR@ -l3270 -TMPDIR=.tmp +TMPDIR ?= .tmp GLOBAL_DEPS=$(PWD)/include/*.h $(PWD)/include/lib3270/*.h LANG_FILES=$(wildcard po/*.po) @@ -116,6 +116,7 @@ po/%.po: $(PACKAGE_NAME).po @cp $@ $(TMPDIR)/$@ 2> $(TMPDIR)/cp.err > $(TMPDIR)/cp.out || true @touch $(TMPDIR)/$@ @$(MSGMERGE) $(TMPDIR)/$@ $(PACKAGE_NAME).po --output-file=$@ + @rm -fr $(TMPDIR)/po $(BINDIR)/Release/$(localedir)/%/LC_MESSAGES/$(PACKAGE_NAME).mo: po/%.po @echo " FMT `basename $@`" diff --git a/po/pt_BR.po b/po/pt_BR.po index fecd741..4efd495 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-12-26 10:34-0200\n" +"POT-Creation-Date: 2012-12-26 11:20-0200\n" "PO-Revision-Date: 2012-12-26 10:36-0200\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português <>\n" @@ -268,7 +268,7 @@ msgstr "Não posso aceitar elemento %s sem nome" msgid "Can't connect to %s:%d" msgstr "Não foi possível conectar a %s:%d" -#: host.c:316 +#: host.c:154 msgid "Can't connect to host" msgstr "Não foi possível conectar ao servidor" @@ -281,7 +281,7 @@ msgstr "Não foi possível converter a linha %d de %s para %s" msgid "Can't cut rectangular regions" msgstr "Recortar não permitido em seleção retangular" -#: ft.c:307 +#: ft.c:311 msgid "Can't get file size" msgstr "Não foi possível obter o tamanho do arquivo" @@ -294,7 +294,7 @@ msgstr "Não foi possível carregar %s" msgid "Can't load file" msgstr "Não foi possível carregar arquivo" -#: ft.c:226 +#: ft.c:230 msgid "Can't open local file" msgstr "Não foi possível abrir arquivo local" @@ -511,15 +511,15 @@ msgstr "EOR recebido fora do modo 3270, ignorado." msgid "ET_A" msgstr "ET_A" -#: host.c:340 +#: host.c:178 msgid "Empty LU name" msgstr "Nome da LU está em branco" -#: host.c:267 host.c:394 +#: host.c:105 host.c:232 msgid "Empty hostname" msgstr "Nome do servidor em branco" -#: host.c:447 +#: host.c:285 msgid "Empty port name" msgstr "Porta em branco" @@ -675,7 +675,7 @@ msgstr "HTTP Proxy: Resposta desconhecida" msgid "Help" msgstr "Ajuda" -#: ft.c:524 +#: ft.c:528 msgid "Host disconnected, transfer cancelled" msgstr "Servidor desconectou, transferência cancelada" @@ -707,8 +707,8 @@ msgstr "Tipo do sistema no servidor" msgid "Host to connect" msgstr "Servidor a conectar" -#: host.c:315 host.c:340 host.c:352 host.c:378 host.c:390 host.c:394 -#: host.c:447 host.c:462 +#: host.c:153 host.c:178 host.c:190 host.c:216 host.c:228 host.c:232 +#: host.c:285 host.c:300 msgid "Hostname syntax error" msgstr "Formato inválido no nome do servidor" @@ -740,7 +740,7 @@ msgstr "Intensificado/Protegido" msgid "Intensified/Unprotected" msgstr "Intensificado/Desprotegido" -#: host.c:496 +#: host.c:334 msgid "Invalid (empty) hostname" msgstr "Nome do host é invalido (vazio)" @@ -791,7 +791,7 @@ msgstr "Barra lateral" msgid "Misc colors" msgstr "Cores diversas" -#: host.c:390 +#: host.c:228 msgid "Missing ']'" msgstr "Faltando ']'" @@ -812,7 +812,7 @@ msgstr "Monocromático" msgid "Move action needs target & direction attributes" msgstr "Ação \"move\" precisa dos atributos \"target\" e \"direction\"" -#: host.c:462 +#: host.c:300 msgid "Multiple port names" msgstr "Múltiplos nomes de porta" @@ -852,7 +852,7 @@ msgstr "Normal/Desprotegido" msgid "Not available" msgstr "Não disponível" -#: ft.c:531 +#: ft.c:535 msgid "Not in 3270 mode, transfer cancelled" msgstr "Não está no modo 3270, transferência cancelada" @@ -876,7 +876,7 @@ msgstr "Estado inválido na OIA" msgid "OIA status ok" msgstr "Estado normal na OIA" -#: host.c:317 +#: host.c:155 #, c-format msgid "Option '%c:' is not supported" msgstr "Opção não suportada: '%c:'" @@ -1342,7 +1342,7 @@ msgstr "Erro de leitura SSL" msgid "SSL connect failed!" msgstr "Conexão SSL falhou" -#: host.c:302 +#: host.c:140 msgid "SSL error" msgstr "Erro SSL" @@ -1491,7 +1491,7 @@ msgstr "Erro ao enviar dados para a rede" msgid "Space allocation units" msgstr "Space allocation units" -#: host.c:352 +#: host.c:190 msgid "Space in LU name" msgstr "Espaço no nome da LU" @@ -1519,7 +1519,7 @@ msgstr "T_otal" msgid "Terminal colors" msgstr "Cores do terminal" -#: host.c:378 +#: host.c:216 msgid "Text before '['" msgstr "Texto antes de '['" @@ -1565,7 +1565,7 @@ msgstr "" msgid "This program requires GTK version %d.%d.%d" msgstr "Este programa precisa do GTK versão %d.%d.%d" -#: host.c:304 +#: host.c:142 #, c-format msgid "" "This version of %s was built without support for secure sockets layer (SSL)." @@ -1615,7 +1615,7 @@ msgstr "UTF-8" msgid "Uknown DFT Open type from host" msgstr "Servidor enviou código de abertura DFT desconhecido" -#: host.c:303 +#: host.c:141 msgid "Unable to connect to secure hosts" msgstr "Não é possível conectar em servidores seguros" @@ -1623,7 +1623,7 @@ msgstr "Não é possível conectar em servidores seguros" msgid "Unable to paste text" msgstr "Incapaz de colar texto" -#: ft.c:391 +#: ft.c:395 msgid "Unable to send file-transfer request" msgstr "Não foi possível enviar a requisição de transferência de arquivo" @@ -1766,11 +1766,11 @@ msgstr "WSAEventSelect falhou" msgid "WSAStartup failed" msgstr "WSAStartup falhou" -#: ft.c:400 +#: ft.c:404 msgid "Waiting for GET response" msgstr "Aguardando resposta do pedido de download" -#: ft.c:402 +#: ft.c:406 msgid "Waiting for PUT response" msgstr "Aguardando resposta do pedido de upload" diff --git a/src/lib3270/ft.c b/src/lib3270/ft.c index 7174c4e..71dbf42 100644 --- a/src/lib3270/ft.c +++ b/src/lib3270/ft.c @@ -219,7 +219,11 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); } // Open local file +#ifdef _WIN32 + ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "ab" : "wb") : "rb"); +#else ft_local_file = fopen(local,(flags & LIB3270_FT_OPTION_RECEIVE) ? ((flags & LIB3270_FT_OPTION_APPEND) ? "a" : "w") : "r"); +#endif // _WIN32 if(!ft_local_file) { diff --git a/src/lib3270/host.c b/src/lib3270/host.c index 45b6ad4..10a5d8b 100644 --- a/src/lib3270/host.c +++ b/src/lib3270/host.c @@ -60,168 +60,6 @@ static void try_reconnect(H3270 *session); /* -static char * stoken(char **s) -{ - char *r; - char *ss = *s; - - if (!*ss) - return NULL; - r = ss; - while (*ss && *ss != ' ' && *ss != '\t') - ss++; - if (*ss) { - *ss++ = '\0'; - while (*ss == ' ' || *ss == '\t') - ss++; - } - *s = ss; - return r; -} -*/ - -/* - * Read the host file - */ /* -void -hostfile_init(void) -{ - FILE *hf; - char buf[1024]; - static Boolean hostfile_initted = False; - struct host *h; - char *hostfile_name; - - if (hostfile_initted) - return; - - hostfile_initted = True; - hostfile_name = appres.hostsfile; - if (hostfile_name == CN) - hostfile_name = xs_buffer("%s/ibm_hosts", appres.conf_dir); - else - hostfile_name = do_subst(appres.hostsfile, True, True); - hf = fopen(hostfile_name, "r"); - if (hf != (FILE *)NULL) { - while (fgets(buf, sizeof(buf), hf)) { - char *s = buf; - char *name, *entry_type, *hostname; - char *slash; - - if (strlen(buf) > (unsigned)1 && - buf[strlen(buf) - 1] == '\n') { - buf[strlen(buf) - 1] = '\0'; - } - while (isspace(*s)) - s++; - if (!*s || *s == '#') - continue; - name = stoken(&s); - entry_type = stoken(&s); - hostname = stoken(&s); - if (!name || !entry_type || !hostname) { - popup_an_error("Bad %s syntax, entry skipped", - ResHostsFile); - continue; - } - h = (struct host *)lib3270_malloc(sizeof(*h)); - if (!split_hier(NewString(name), &h->name, - &h->parents)) { - lib3270_free(h); - continue; - } - h->hostname = NewString(hostname); - - // - // Quick syntax extension to allow the hosts file to - // specify a port as host/port. - // - if ((slash = strchr(h->hostname, '/'))) - *slash = ':'; - - if (!strcmp(entry_type, "primary")) - h->entry_type = PRIMARY; - else - h->entry_type = ALIAS; - if (*s) - h->loginstring = NewString(s); - else - h->loginstring = CN; - h->prev = last_host; - h->next = (struct host *)NULL; - if (last_host) - last_host->next = h; - else - hosts = h; - last_host = h; - } - (void) fclose(hf); - } else if (appres.hostsfile != CN) { - popup_an_errno(errno, "Cannot open " ResHostsFile " '%s'", - appres.hostsfile); - } - lib3270_free(hostfile_name); - -// #if defined(X3270_DISPLAY) -// save_recent(CN); -// #endif -} -*/ - -/* - * Look up a host in the list. Turns aliases into real hostnames, and - * finds loginstrings. - */ /* -static int -hostfile_lookup(const char *name, char **hostname, char **loginstring) -{ - struct host *h; - - hostfile_init(); - for (h = hosts; h != (struct host *)NULL; h = h->next) { - if (h->entry_type == RECENT) - continue; - if (!strcmp(name, h->name)) { - *hostname = h->hostname; - if (h->loginstring != CN) { - *loginstring = h->loginstring; - } else { - *loginstring = appres.login_macro; - } - return 1; - } - } - return 0; -} -*/ - -/* -#if defined(LOCAL_PROCESS) -// Recognize and translate "-e" options. -static const char * -parse_localprocess(const char *s) -{ - int sl = strlen(OptLocalProcess); - - if (!strncmp(s, OptLocalProcess, sl)) { - if (s[sl] == ' ') - return(s + sl + 1); - else if (s[sl] == '\0') { - char *r; - - r = getenv("SHELL"); - if (r != CN) - return r; - else - return "/bin/sh"; - } - } - return CN; -} -#endif -*/ - -/* * Strip qualifiers from a hostname. * Returns the hostname part in a newly-malloc'd string. * 'needed' is returned True if anything was actually stripped. -- libgit2 0.21.2