FOSSology  4.4.0
Open Source License Compliance by Open Source Software
finder.h
1 /*
2  SPDX-FileCopyrightText: © 2011 Hewlett-Packard Development Company, L.P.
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 
8 #include <stdlib.h>
9 #include <stdio.h>
10 #include <unistd.h>
11 #include <string.h>
12 #include <ctype.h>
13 #include <signal.h>
14 #include <magic.h>
15 #include <libgen.h>
16 
17 #include "libfossology.h"
18 
19 #define MAXCMD 1024
20 extern char SQL[MAXCMD];
21 
22 extern PGresult *DBMime;
23 extern int MaxDBMime;
24 extern PGconn *pgConn;
25 extern int Agent_pk;
26 
27 extern FILE *FMimetype;
28 
29 extern magic_t MagicCookie;
30 
31 extern int Akey;
32 extern char A[MAXCMD];
33 
34 void SetEnv (char *S);
35 void DBCheckMime (char *Filename);
36 int ReadLine(FILE *Fin, char *Line, int MaxLine);
37 void Usage (char *Name);
38 int DBFindMime (char *Mimetype);
char SQL[256]
SQL query to execute.
Definition: adj2nest.c:78
PGconn * pgConn
Database connection.
Definition: adj2nest.c:86
FILE * FMimetype
for /etc/mime.types
Definition: finder.c:21
int DBFindMime(char *Mimetype)
Find a mime type in the DBMime table.
Definition: finder.c:81
char A[MAXCMD]
input for this system
Definition: finder.c:26
magic_t MagicCookie
for Magic
Definition: finder.c:23
int MaxDBMime
how many rows in DBMime
Definition: finder.c:17
void DBCheckMime(char *Filename)
Given a file, check if it has a mime type in the DB.
Definition: finder.c:281
int Agent_pk
agent identifier
Definition: finder.c:19
PGresult * DBMime
contents of mimetype table
Definition: finder.c:16
Usage()
Print Usage statement.
Definition: fo_dbcheck.php:63
The main FOSSology C library.
int ReadLine(FILE *Fin, char *Line, int MaxLine)
Definition: repcopyin.c:64
char * Filename
Filename.
Definition: run_tests.c:17
void SetEnv(char *S, char *TempFileDir)
Convert input pairs into globals.
Definition: wget_agent.c:683