Switch to unified view

a/src/smallut.cpp b/src/smallut.cpp
1
/* Copyright (C) 2004-2016 J.F.Dockes
1
/* Copyright (C) 2006-2016 J.F.Dockes
2
 *   This program is free software; you can redistribute it and/or modify
3
 *   it under the terms of the GNU General Public License as published by
4
 *   the Free Software Foundation; either version 2 of the License, or
5
 *   (at your option) any later version.
6
 *
2
 *
7
 *   This program is distributed in the hope that it will be useful,
3
 * This library is free software; you can redistribute it and/or
8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
4
 * modify it under the terms of the GNU Lesser General Public
9
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5
 * License as published by the Free Software Foundation; either
10
 *   GNU General Public License for more details.
6
 * version 2.1 of the License, or (at your option) any later version.
11
 *
7
 *
8
 * This library is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 * Lesser General Public License for more details.
12
 *
12
 *   You should have received a copy of the GNU General Public License
13
 * You should have received a copy of the GNU Lesser General Public
13
 *   along with this program; if not, write to the
14
 * License along with this library; if not, write to the Free Software
14
 *   Free Software Foundation, Inc.,
15
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 *   02110-1301 USA
16
 */
17
 */
17
#include <stdio.h>
18
#include <stdio.h>
18
#include <stdlib.h>
19
#include <stdlib.h>
19
#include <time.h>
20
#include <time.h>
20
#include <ctype.h>
21
#include <ctype.h>
...
...
180
            ++it1;
181
            ++it1;
181
            ++it2;
182
            ++it2;
182
        }
183
        }
183
        return size1 == size2 ? 0 : 1;
184
        return size1 == size2 ? 0 : 1;
184
    }
185
    }
186
}
187
188
bool beginswith(const std::string& big, const std::string& small)
189
{
190
    if (big.compare(0, small.size(), small)) {
191
        return false;
192
    }
193
    return true;
185
}
194
}
186
195
187
// Compare charset names, removing the more common spelling variations
196
// Compare charset names, removing the more common spelling variations
188
bool samecharset(const string& cs1, const string& cs2)
197
bool samecharset(const string& cs1, const string& cs2)
189
{
198
{