资源简介
linux下基于client/server的通用LCD驱动程序,支持很多流行的LCD控制器。
代码片段和文件信息
/* \file clients/lcdexec/lcdexec.c
* Main file for \lcdexec the program starter in the LCDproc suite.
*/
/* This file is part of lcdexec an LCDproc client.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 2002 Joris Robijn
* 2006-2008 Peter Marschall
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “getopt.h“
#include “shared/str.h“
#include “shared/report.h“
#include “shared/configfile.h“
#include “shared/sockets.h“
#include “menu.h“
#if !defined(SYSCONFDIR)
# define SYSCONFDIR “/etc“
#endif
#if !defined(PIDFILEDIR)
# define PIDFILEDIR “/var/run“
#endif
#define DEFAULT_CONFIGFILE SYSCONFDIR “/lcdexec.conf“
#define DEFAULT_PIDFILE PIDFILEDIR “/lcdexec.pid“
/** information about a process started by lcdexec */
typedef struct ProcInfo {
struct ProcInfo *next; /**< pointer to the next ProcInfo entry */
const MenuEntry *cmd; /**< pointer to the corresponding menu entry */
pid_t pid; /**< PID the process was started with */
time_t starttime; /**< start time of the process */
time_t endtime; /**< finishing time of the process */
int status; /**< exit status of the process */
int feedback; /**< what info to show to the user */
int shown; /**< tell if the info has been shown to the user */
} ProcInfo;
char * help_text =
“lcdexec - LCDproc client to execute commands from the LCDd menu\n“
“\n“
“Copyright (c) 2002 Joris Robijn 2006-2008 Peter Marschall.\n“
“This program is released under the terms of the GNU General Public License.\n“
“\n“
“Usage: lcdexec []\n“
“ where are:\n“
“ -c Specify configuration file [“DEFAULT_CONFIGFILE“]\n“
“ -a DNS name or IP address of the LCDd server [localhost]\n“
“ -p port of the LCDd server [13666]\n“
“ -f Run in foreground\n“
“ -r Set reporting level (0-5) [2: errors and warnings]\n“
“ -s <0|1> Report to syslog (1) or stderr (0 default)\n“
“ -h Show this help\n“;
char *progname = “lcdexec“;
/* Variables set by config */
#define UNSET_INT -1
#define UNSET_STR “\01“
char *configfile = NULL;
char *address = NULL;
int port = UNSET_INT;
int foreground = FALSE;
static int report_level = UNSET_INT;
static int report_dest = UNSET_INT;
char *pidfile = NULL;
int pidfile_written = FALSE;
char *displayname = NULL;
char *default_shell = NULL;
/* Other global variables */
MenuEntry *main_menu = NULL; /**< pointer to the main menu */
ProcInfo *proc_queue = NULL; /**< pointer to the list of executed processes */
int lcd_wid = 0; /**< LCD display width reported by the server */
int lcd_hgt = 0; /**< LCD display height reported by the server */
int sock = -1; /**< socket to connect to server
- 上一篇:打砖块(flash)
- 下一篇:标准粒子群算法求解非线性方程
相关资源
- ippicv_2017u2_lnx_intel64_20170418.tgz
- Write an ALSA Driver
- 基于GTK+的单词数值计算器
- linux下dnw安装包适合tiny4412
- linux下编写的一个简单的通讯录.zip
- 侦测ip端口小工具tcping linux版
- callback手把手教你写回调函数源代码
- 用gtk开发的电子时钟
- Linux程序设计第四版_源代码免积分
- 嵌入式linux下截图工具gsnap移植源码
- soapClient.zip
- Ericsson的moshell命令大全
- atheros ar8171网卡驱动 CentOS6.4 已调通
- 用51单片机实现小车循迹和LCD显示
- 5110LCD与89c52做出来的贪吃蛇程序工程
- ST16C554扩展串口驱动程序
- modbus tcp/ip通信client
- ARM_Linux嵌入式系统在农业大棚中的应
- USR-TCP232-Test.exe
- 简单、规范的Linux下的ds18b20驱动基于
- 基于Linux的C源代码——一个简单的从
- 基于arm平台的MP3播放器
- FPGA驱动LCD1602完整工程
- ( linux常用命令集PDF版.pdf )
- NI采集卡 linux驱动
- libncurses.so.5.5
- CentOS-7-x86_64镜像文件
- LCD1602 PCB封装库
- 基于89C51的等精度频率计LCD1602显示基
- libjpeg.so.62
评论
共有 条评论