Macros | Functions | Variables
tinyfiledialogs.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include "tinyfiledialogs.h"
#include <limits.h>
#include <unistd.h>
#include <dirent.h>
#include <termios.h>
#include <sys/utsname.h>
#include <signal.h>
Include dependency graph for tinyfiledialogs.c:

Go to the source code of this file.

Macros

#define _POSIX_C_SOURCE   2 /* to accept POSIX 2 in old ANSI C standards */
 
#define MAX_MULTIPLE_FILES   32
 
#define MAX_PATH_OR_CMD   1024 /* _MAX_PATH or MAX_PATH */
 
#define SLASH   "/"
 

Functions

static int afplayPresent (void)
 
static int beepexePresent (void)
 
static int detectPresence (char const *const aExecutable)
 
static char const * dialogName (void)
 
static char const * dialogNameOnly (void)
 
static int dirExists (char const *const aDirPath)
 
static char const * ensureFilesExist (char *const aDestination, char const *const aSourcePathsAndNames)
 
static void ensureFinalSlash (char *const aioString)
 
static int fileExists (char const *const aFilePathAndName)
 
static int filenameValid (char const *const aFileNameWithoutPath)
 
static int gdialogPresent (void)
 
static char * getLastName (char *const aoDestination, char const *const aSource)
 
static int *const getMajorMinorPatch (char const *const aExecutable)
 
static char * getPathWithoutFinalSlash (char *const aoDestination, char const *const aSource)
 
static char const * getVersion (char const *const aExecutable)
 
static int gmessagePresent (void)
 
static int graphicMode (void)
 
static int gxmessagePresent (void)
 
static void Hex2RGB (char const aHexRGB[8], unsigned char aoResultRGB[3])
 
static int isDarwin (void)
 
int isDialogVersionBetter09b (void)
 
static int isTerminalRunning (void)
 
static int kdialogPresent (void)
 
static int matedialogPresent (void)
 
static int notifysendPresent (void)
 
static int osascriptPresent (void)
 
static int osx9orBetter (void)
 
static int pactlPresent (void)
 
static int perlPresent (void)
 
static int python2Present (void)
 
static int python3Present (void)
 
static int pythonDbusPresent (void)
 
static int qarmaPresent (void)
 
static void replaceSubStr (char const *const aSource, char const *const aOldSubStr, char const *const aNewSubStr, char *const aoDestination)
 
static void RGB2Hex (unsigned char const aRGB[3], char aoResultHexRGB[8])
 
static int shellementaryPresent (void)
 
static void sigHandler (int sig)
 
static int speakertestPresent (void)
 
static char const * terminalName (void)
 
char const * tinyfd_arrayDialog (char const *const aTitle, int const aNumOfColumns, char const *const *const aColumns, int const aNumOfRows, char const *const *const aCells)
 
void tinyfd_beep (void)
 
char const * tinyfd_colorChooser (char const *const aTitle, char const *const aDefaultHexRGB, unsigned char const aDefaultRGB[3], unsigned char aoResultRGB[3])
 
char const * tinyfd_inputBox (char const *const aTitle, char const *const aMessage, char const *const aDefaultInput)
 
int tinyfd_messageBox (char const *const aTitle, char const *const aMessage, char const *const aDialogType, char const *const aIconType, int const aDefaultButton)
 
int tinyfd_notifyPopup (char const *const aTitle, char const *const aMessage, char const *const aIconType)
 
char const * tinyfd_openFileDialog (char const *const aTitle, char const *const aDefaultPathAndFile, int const aNumOfFilterPatterns, char const *const *const aFilterPatterns, char const *const aSingleFilterDescription, int const aAllowMultipleSelects)
 
char const * tinyfd_saveFileDialog (char const *const aTitle, char const *const aDefaultPathAndFile, int const aNumOfFilterPatterns, char const *const *const aFilterPatterns, char const *const aSingleFilterDescription)
 
char const * tinyfd_selectFolderDialog (char const *const aTitle, char const *const aDefaultPath)
 
static int tkinter2Present (void)
 
static int tkinter3Present (void)
 
static int tryCommand (char const *const aCommand)
 
static int whiptailPresent (void)
 
static int whiptailPresentOnly (void)
 
static void wipefile (char const *const aFilename)
 
static int xdialogPresent (void)
 
static int xmessagePresent (void)
 
static int zenity3Present (void)
 
static int zenityPresent (void)
 

Variables

static char gPython2Name [16]
 
static char gPython3Name [16]
 
static char gPythonName [16]
 
static char const gTitle [] ="missing software! (we will try basic console input)"
 
static int gWarningDisplayed = 0
 
int tinyfd_forceConsole = 0
 
char const tinyfd_needs []
 
char tinyfd_response [1024]
 
int tinyfd_silent = 1
 
int tinyfd_verbose = 0
 
char const tinyfd_version [8] = "3.4.1"
 

Macro Definition Documentation

#define _POSIX_C_SOURCE   2 /* to accept POSIX 2 in old ANSI C standards */

Definition at line 91 of file tinyfiledialogs.c.

#define MAX_MULTIPLE_FILES   32

Definition at line 133 of file tinyfiledialogs.c.

#define MAX_PATH_OR_CMD   1024 /* _MAX_PATH or MAX_PATH */

Definition at line 132 of file tinyfiledialogs.c.

#define SLASH   "/"

Definition at line 129 of file tinyfiledialogs.c.

Function Documentation

static int afplayPresent ( void  )
static

Definition at line 3742 of file tinyfiledialogs.c.

static int beepexePresent ( void  )
static

Definition at line 3663 of file tinyfiledialogs.c.

static int detectPresence ( char const *const  aExecutable)
static

Definition at line 3311 of file tinyfiledialogs.c.

static char const* dialogName ( void  )
static

Definition at line 3602 of file tinyfiledialogs.c.

static char const* dialogNameOnly ( void  )
static

Definition at line 3407 of file tinyfiledialogs.c.

static int dirExists ( char const *const  aDirPath)
static

Definition at line 3296 of file tinyfiledialogs.c.

static char const* ensureFilesExist ( char *const  aDestination,
char const *const  aSourcePathsAndNames 
)
static

Definition at line 836 of file tinyfiledialogs.c.

static void ensureFinalSlash ( char *const  aioString)
static

Definition at line 272 of file tinyfiledialogs.c.

static int fileExists ( char const *const  aFilePathAndName)
static

Definition at line 384 of file tinyfiledialogs.c.

static int filenameValid ( char const *const  aFileNameWithoutPath)
static

Definition at line 371 of file tinyfiledialogs.c.

static int gdialogPresent ( void  )
static

Definition at line 3777 of file tinyfiledialogs.c.

static char* getLastName ( char *const  aoDestination,
char const *const  aSource 
)
static

Definition at line 242 of file tinyfiledialogs.c.

static int* const getMajorMinorPatch ( char const *const  aExecutable)
static

Definition at line 3357 of file tinyfiledialogs.c.

static char* getPathWithoutFinalSlash ( char *const  aoDestination,
char const *const  aSource 
)
static

Definition at line 212 of file tinyfiledialogs.c.

static char const* getVersion ( char const *const  aExecutable)
static

Definition at line 3337 of file tinyfiledialogs.c.

static int gmessagePresent ( void  )
static

Definition at line 3696 of file tinyfiledialogs.c.

static int graphicMode ( void  )
static

Definition at line 3633 of file tinyfiledialogs.c.

static int gxmessagePresent ( void  )
static

Definition at line 3685 of file tinyfiledialogs.c.

static void Hex2RGB ( char const  aHexRGB[8],
unsigned char  aoResultRGB[3] 
)
static

Definition at line 285 of file tinyfiledialogs.c.

static int isDarwin ( void  )
static

Definition at line 3284 of file tinyfiledialogs.c.

int isDialogVersionBetter09b ( void  )

Definition at line 3427 of file tinyfiledialogs.c.

static int isTerminalRunning ( void  )
static

Definition at line 3395 of file tinyfiledialogs.c.

static int kdialogPresent ( void  )
static

Definition at line 3885 of file tinyfiledialogs.c.

static int matedialogPresent ( void  )
static

Definition at line 3811 of file tinyfiledialogs.c.

static int notifysendPresent ( void  )
static

Definition at line 3707 of file tinyfiledialogs.c.

static int osascriptPresent ( void  )
static

Definition at line 3788 of file tinyfiledialogs.c.

static int osx9orBetter ( void  )
static

Definition at line 3938 of file tinyfiledialogs.c.

static int pactlPresent ( void  )
static

Definition at line 3641 of file tinyfiledialogs.c.

static int perlPresent ( void  )
static

Definition at line 3718 of file tinyfiledialogs.c.

static int python2Present ( void  )
static

Definition at line 3965 of file tinyfiledialogs.c.

static int python3Present ( void  )
static

Definition at line 3999 of file tinyfiledialogs.c.

static int pythonDbusPresent ( void  )
static

Definition at line 4076 of file tinyfiledialogs.c.

static int qarmaPresent ( void  )
static

Definition at line 3800 of file tinyfiledialogs.c.

static void replaceSubStr ( char const *const  aSource,
char const *const  aOldSubStr,
char const *const  aNewSubStr,
char *const  aoDestination 
)
static

Definition at line 335 of file tinyfiledialogs.c.

static void RGB2Hex ( unsigned char const  aRGB[3],
char  aoResultHexRGB[8] 
)
static

Definition at line 310 of file tinyfiledialogs.c.

static int shellementaryPresent ( void  )
static

Definition at line 3822 of file tinyfiledialogs.c.

static void sigHandler ( int  sig)
static

Definition at line 4109 of file tinyfiledialogs.c.

static int speakertestPresent ( void  )
static

Definition at line 3652 of file tinyfiledialogs.c.

static char const* terminalName ( void  )
static

Definition at line 3475 of file tinyfiledialogs.c.

char const* tinyfd_arrayDialog ( char const *const  aTitle,
int const  aNumOfColumns,
char const *const *const  aColumns,
int const  aNumOfRows,
char const *const *const  aCells 
)

Definition at line 7260 of file tinyfiledialogs.c.

void tinyfd_beep ( void  )

Definition at line 4118 of file tinyfiledialogs.c.

char const* tinyfd_colorChooser ( char const *const  aTitle,
char const *const  aDefaultHexRGB,
unsigned char const  aDefaultRGB[3],
unsigned char  aoResultRGB[3] 
)

Definition at line 6977 of file tinyfiledialogs.c.

char const* tinyfd_inputBox ( char const *const  aTitle,
char const *const  aMessage,
char const *const  aDefaultInput 
)

Definition at line 5291 of file tinyfiledialogs.c.

int tinyfd_messageBox ( char const *const  aTitle,
char const *const  aMessage,
char const *const  aDialogType,
char const *const  aIconType,
int const  aDefaultButton 
)

Definition at line 4168 of file tinyfiledialogs.c.

int tinyfd_notifyPopup ( char const *const  aTitle,
char const *const  aMessage,
char const *const  aIconType 
)

Definition at line 5092 of file tinyfiledialogs.c.

char const* tinyfd_openFileDialog ( char const *const  aTitle,
char const *const  aDefaultPathAndFile,
int const  aNumOfFilterPatterns,
char const *const *const  aFilterPatterns,
char const *const  aSingleFilterDescription,
int const  aAllowMultipleSelects 
)

Definition at line 6240 of file tinyfiledialogs.c.

char const* tinyfd_saveFileDialog ( char const *const  aTitle,
char const *const  aDefaultPathAndFile,
int const  aNumOfFilterPatterns,
char const *const *const  aFilterPatterns,
char const *const  aSingleFilterDescription 
)

Definition at line 5842 of file tinyfiledialogs.c.

char const* tinyfd_selectFolderDialog ( char const *const  aTitle,
char const *const  aDefaultPath 
)

Definition at line 6703 of file tinyfiledialogs.c.

static int tkinter2Present ( void  )
static

Definition at line 4033 of file tinyfiledialogs.c.

static int tkinter3Present ( void  )
static

Definition at line 4055 of file tinyfiledialogs.c.

static int tryCommand ( char const *const  aCommand)
static

Definition at line 3375 of file tinyfiledialogs.c.

static int whiptailPresent ( void  )
static

Definition at line 3617 of file tinyfiledialogs.c.

static int whiptailPresentOnly ( void  )
static

Definition at line 3464 of file tinyfiledialogs.c.

static void wipefile ( char const *const  aFilename)
static

Definition at line 425 of file tinyfiledialogs.c.

static int xdialogPresent ( void  )
static

Definition at line 3766 of file tinyfiledialogs.c.

static int xmessagePresent ( void  )
static

Definition at line 3674 of file tinyfiledialogs.c.

static int zenity3Present ( void  )
static

Definition at line 3844 of file tinyfiledialogs.c.

static int zenityPresent ( void  )
static

Definition at line 3833 of file tinyfiledialogs.c.

Variable Documentation

char gPython2Name[16]
static

Definition at line 3280 of file tinyfiledialogs.c.

char gPython3Name[16]
static

Definition at line 3281 of file tinyfiledialogs.c.

char gPythonName[16]
static

Definition at line 3282 of file tinyfiledialogs.c.

char const gTitle[] ="missing software! (we will try basic console input)"
static

Definition at line 172 of file tinyfiledialogs.c.

int gWarningDisplayed = 0
static

Definition at line 169 of file tinyfiledialogs.c.

int tinyfd_forceConsole = 0

Definition at line 144 of file tinyfiledialogs.c.

char const tinyfd_needs[]
Initial value:
= "\
___________\n\
/ \\ \n\
| tiny file |\n\
| dialogs |\n\
\\_____ ____/\n\
\\|\
\ntiny file dialogs on UNIX needs:\
\n applescript\
\nor kdialog\
\nor zenity (or matedialog or qarma)\
\nor python (2 or 3)\
\n + tkinter + python-dbus (optional)\
\nor dialog (opens console if needed)\
\nor xterm + bash\
\n (opens console for basic input)\
\nor existing console for basic input"

Definition at line 187 of file tinyfiledialogs.c.

char tinyfd_response[1024]

Definition at line 152 of file tinyfiledialogs.c.

int tinyfd_silent = 1

Definition at line 138 of file tinyfiledialogs.c.

int tinyfd_verbose = 0

Definition at line 137 of file tinyfiledialogs.c.

char const tinyfd_version[8] = "3.4.1"

Definition at line 135 of file tinyfiledialogs.c.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:30