diff --git a/src/core/linux/util.c b/src/core/linux/util.c index f5fb275..ec2636d 100644 --- a/src/core/linux/util.c +++ b/src/core/linux/util.c @@ -1,26 +1,23 @@ +/* SPDX-License-Identifier: LGPL-3.0-or-later */ + /* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob - * o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. + * Copyright (C) 2008 Banco do Brasil S.A. * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * Este programa está nomeado como - e possui - linhas de código. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +/* * Contatos: * * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) diff --git a/src/core/windows/util.c b/src/core/windows/util.c index 44fc6bb..4a8ac0d 100644 --- a/src/core/windows/util.c +++ b/src/core/windows/util.c @@ -1,26 +1,23 @@ +/* SPDX-License-Identifier: LGPL-3.0-or-later */ + /* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob - * o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. + * Copyright (C) 2008 Banco do Brasil S.A. * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * Este programa está nomeado como - e possui - linhas de código. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +/* * Contatos: * * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) @@ -286,8 +283,16 @@ static char * build_filename(const char *str, va_list args) { #endif // DEBUG ptr = strrchr(filename,'\\'); - if(ptr) - ptr[1] = 0; + if(ptr) { + ptr[0] = 0; + + ptr = strrchr(filename,'\\'); + if(ptr && !(strcasecmp(ptr,"\\bin") && strcasecmp(ptr,"\\lib"))) { + *ptr = 0; + } + + strncat(filename,"\\",szFilename); + } while(str) { filename = concat(filename,str,&szFilename); diff --git a/src/testprogram/testprogram.c b/src/testprogram/testprogram.c index a8283ce..191ad31 100644 --- a/src/testprogram/testprogram.c +++ b/src/testprogram/testprogram.c @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) { { lib3270_autoptr(char) testfilename = lib3270_build_data_filename("test",NULL); printf("\n\nFilename: '%s'\n\n", testfilename); -// return 0; + return 0; } // #pragma GCC diagnostic push -- libgit2 0.21.2