Subversion Repositories Keine

Rev

Rev 6 | Rev 9 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6 Rev 7
Line 1... Line 1...
1
/* $Id: man.c 6 2024-09-11 15:45:32Z nishi $ */
1
/* $Id: man.c 7 2024-09-11 15:46:04Z nishi $ */
2
 
2
 
3
#include "../config.h"
3
#include "../config.h"
4
 
4
 
5
#include "kn_man.h"
5
#include "kn_man.h"
6
 
6
 
Line 45... Line 45...
45
 
45
 
46
bool kn_has_manpage(const char* str) {
46
bool kn_has_manpage(const char* str) {
47
#ifdef MANPAGE_DIRS
47
#ifdef MANPAGE_DIRS
48
	int i;
48
	int i;
49
	const char* dirs[] = MANPAGE_DIRS;
49
	const char* dirs[] = MANPAGE_DIRS;
50
	for(i = 0; i < sizeof(dirs) / sizeof(*dirs); i++){
50
	for(i = 0; i < sizeof(dirs) / sizeof(*dirs); i++) {
51
		char* pth = kn_find(dirs[i], str);
51
		char* pth = kn_find(dirs[i], str);
52
		if(pth != NULL){
52
		if(pth != NULL) {
53
			free(pth);
53
			free(pth);
54
			return true;
54
			return true;
55
		}
55
		}
56
	}
56
	}
57
	return false;
57
	return false;