diff --git a/src/utils/conftree.h b/src/utils/conftree.h index d6111e84..f976506c 100644 --- a/src/utils/conftree.h +++ b/src/utils/conftree.h @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2006 J.F.Dockes * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/utils/execmd.cpp b/src/utils/execmd.cpp index 0db9032b..c27eeaef 100644 --- a/src/utils/execmd.cpp +++ b/src/utils/execmd.cpp @@ -888,7 +888,7 @@ again: int n = con->getline(buf, BS, timeosecs); if (n < 0) { if (con->timedout()) { - LOGDEB("ExecCmd::getline: timeout\n"); + LOGDEB0("ExecCmd::getline: select timeout, report and retry\n"); if (m->m_advise) { m->m_advise->newData(0); } diff --git a/src/utils/log.cpp b/src/utils/log.cpp index 1b57d2a5..d98efe15 100644 --- a/src/utils/log.cpp +++ b/src/utils/log.cpp @@ -1,20 +1,20 @@ -/* Copyright (C) 2014 J.F.Dockes - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* Copyright (C) 2006-2016 J.F.Dockes * - * 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. + * This library 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 2.1 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ - #include "log.h" #include diff --git a/src/utils/log.h b/src/utils/log.h index 6d43c671..d4ef403d 100644 --- a/src/utils/log.h +++ b/src/utils/log.h @@ -14,6 +14,23 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Copyright (C) 2006-2016 J.F.Dockes + * + * This library 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 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ #ifndef _LOG_H_X_INCLUDED_ #define _LOG_H_X_INCLUDED_ diff --git a/src/utils/smallut.cpp b/src/utils/smallut.cpp index 66d94e17..5f260c87 100644 --- a/src/utils/smallut.cpp +++ b/src/utils/smallut.cpp @@ -1,18 +1,19 @@ -/* Copyright (C) 2004-2016 J.F.Dockes - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* Copyright (C) 2006-2016 J.F.Dockes * - * 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. + * This library 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 2.1 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #include #include @@ -184,6 +185,14 @@ int stringuppercmp(const string& s1, const string& s2) } } +bool beginswith(const std::string& big, const std::string& small) +{ + if (big.compare(0, small.size(), small)) { + return false; + } + return true; +} + // Compare charset names, removing the more common spelling variations bool samecharset(const string& cs1, const string& cs2) { diff --git a/src/utils/smallut.h b/src/utils/smallut.h index fc79f34a..1281a6f9 100644 --- a/src/utils/smallut.h +++ b/src/utils/smallut.h @@ -1,18 +1,19 @@ -/* Copyright (C) 2004-2016 J.F.Dockes - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* Copyright (C) 2006-2016 J.F.Dockes * - * 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. + * This library 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 2.1 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _SMALLUT_H_INCLUDED_ #define _SMALLUT_H_INCLUDED_ @@ -65,6 +66,7 @@ extern void stringtolower(std::string& io); extern std::string stringtolower(const std::string& io); extern void stringtoupper(std::string& io); extern std::string stringtoupper(const std::string& io); +extern bool beginswith(const std::string& big, const std::string& small); // Is one string the end part of the other ? extern int stringisuffcmp(const std::string& s1, const std::string& s2); diff --git a/src/utils/workqueue.h b/src/utils/workqueue.h index 9c0ec02b..216876ac 100644 --- a/src/utils/workqueue.h +++ b/src/utils/workqueue.h @@ -1,18 +1,19 @@ -/* Copyright (C) 2012-2016 J.F.Dockes - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. +/* Copyright (C) 2006-2016 J.F.Dockes * - * 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. + * This library 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 2.1 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA */ #ifndef _WORKQUEUE_H_INCLUDED_ #define _WORKQUEUE_H_INCLUDED_