]>
Commit | Line | Data |
---|---|---|
7b606ae5 RC |
1 | /* |
2 | * Copyright (c) 2001, Robert Collins. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * A copy of the GNU General Public License can be found at | |
10 | * http://www.gnu.org/ | |
11 | * | |
12 | * Written by Robert Collins <rbtcollins@hotmail.com> | |
13 | * | |
14 | */ | |
15 | ||
16 | /* categories for packages */ | |
17 | ||
18 | #include <stdlib.h> | |
19 | #include <string.h> | |
20 | ||
21 | #include "category.h" | |
22 | ||
23 | /* normal members */ | |
24 | ||
3c054baf | 25 | Category::Category ():next (0), name (), key (), packages (0) |
7b606ae5 RC |
26 | { |
27 | } | |
28 | ||
3c054baf | 29 | Category::Category (String const &categoryname): |
fa0c0d10 | 30 | next (0), |
3c054baf | 31 | name (categoryname), key(categoryname), |
fa0c0d10 | 32 | packages (0) |
7b606ae5 | 33 | { |
4fe323f9 RC |
34 | } |
35 | ||
36 | int | |
d343da15 | 37 | Categorycmp (Category const & a, Category const & b) |
4fe323f9 | 38 | { |
3c054baf | 39 | return a.name.casecompare (b.name); |
7b606ae5 | 40 | } |
d343da15 RC |
41 | |
42 | int | |
43 | Categorycmp (Category & a, Category & b) | |
44 | { | |
3c054baf | 45 | return a.name.casecompare (b.name); |
d343da15 | 46 | } |