FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <libgen.h>
#include "libfossology.h"
Go to the source code of this file.
Classes | |
struct | uploadtree |
Contains information required by uploadtree elements. More... | |
Macros | |
#define | MAXCMD 4096 |
#define | myBUFSIZ 2048 |
Typedefs | |
typedef struct uploadtree | uploadtree |
Functions | |
void | WalkTree (long Index, long Depth) |
void | SetParent (long Parent, long Child) |
void | LoadAdj (long UploadPk) |
void | RunAllNew () |
void | ListUploads () |
int | MatchField (char *Field, char *S) |
char * | SkipFieldValue (char *S) |
char * | UntaintValue (char *Sin, char *Sout) |
int | SetParm (char *ParmName, char *Parm) |
int | UpdateUpload (long UploadPk) |
Finish updating the upload record and permissions data. More... | |
void | Usage (char *Name) |
int | main (int argc, char *argv[]) |
Variables | |
char | SQL [256] |
SQL query to execute. | |
char | BuildVersion [] ="adj2nest build version: NULL.\n" |
PGconn * | pgConn = NULL |
Database connection. More... | |
uploadtree * | Tree =NULL |
char * | uploadtree_tablename |
upload.uploadtree_tablename More... | |
long | TreeSize =0 |
long | TreeSet =0 |
long | SetNum =0 |
int | isBigUpload =0 |
void LoadAdj | ( | long | UploadPk | ) |
Given an upload_pk, load the adjacency table. This is in the format "every child knows its parent". Returns the adjacency tree.
UploadPk | Upload ID to be aj2nested |
Definition at line 219 of file adj2nest.c.
void SetParent | ( | long | Parent, |
long | Child | ||
) |
Given a parent and a child, add the child to the parent's chain. NOTE: This is iterative!
Parent | ID of the parent to add child. |
Child | ID of the child to be added. |
Definition at line 156 of file adj2nest.c.
int UpdateUpload | ( | long | UploadPk | ) |
Finish updating the upload record and permissions data.
UploadPk | Upload ID to be updated |
Definition at line 536 of file adj2nest.c.
void WalkTree | ( | long | Index, |
long | Depth | ||
) |
Given a tree, recursively walk it.
Index | ID of the uploadtree element |
Depth | Maximum depth for the recursion |
Definition at line 114 of file adj2nest.c.
PGconn* pgConn = NULL |
long SetNum =0 |
index for tracking set numbers
Definition at line 103 of file adj2nest.c.
long TreeSet =0 |
index for inserting the next child
Definition at line 102 of file adj2nest.c.
char* uploadtree_tablename |
upload.uploadtree_tablename
Name of DB table (uploadtree, uploadtree_a,...)
Definition at line 100 of file adj2nest.c.