Parse the main function arguments
int main(int argc, char **argv) { std::string reportDir;
std::string transURL;
std::string visualElement;
std::string outputFile;
std::string outputType;
static std::string SASFontsLoc;
static std::string SASResLoc;
static std::string SASLocale;
int width=, height=; /* default */
int dpi=; /* Default DPI */
int kpiIndex=, rowIndex=, colIndex=, section=; /* Parse the arguments */
int idx=;
while (idx < argc)
{
if (strcmp(argv[idx], "-report") == )
reportDir = argv[++idx];
else if (strcmp(argv[idx], "-ve") == )
visualElement = argv[++idx];
else if (strcmp(argv[idx], "-section") == )
section = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-outfile") == )
outputFile = argv[++idx];
else if (strcmp(argv[idx], "-outtype") == )
outputType = argv[++idx];
else if (strcmp(argv[idx], "-fontsloc") == )
SASFontsLoc = argv[++idx];
else if (strcmp(argv[idx], "-resourceloc") == )
SASResLoc = argv[++idx];
else if (strcmp(argv[idx], "-locale") == )
SASLocale = argv[++idx];
else if (strcmp(argv[idx], "-dpi") == )
dpi = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-width") == )
width = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-height") == )
height = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-kpiindex") == )
kpiIndex = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-rowindex") == )
rowIndex = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-colindex") == )
colIndex = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-tsurl") == )
transURL = argv[++idx];
idx++;
} return ;
}
Parse the main function arguments的更多相关文章
- Main function
Main function A program shall contain a global function named main, which is the designated start of ...
- [Cycle.js] Customizing effects from the main function
How can we show one string on the DOM, and a completely different string on Console log? This lesson ...
- [Cycle.js] Main function and effects functions
We need to give structure to our application with logic and effects. This lessons shows how we can o ...
- com.android.dx.command.Main with arguments
Error:Execution failed for task ':jingyeyun:transformClassesWithDexForDebug'.> com.android.build. ...
- JS Function Arguments
Function arguments在ECMAScript中的行为并不像其他大多数语言中的函数参数. 在ECMAScript中,function 并不关心有多少个参数传入函数中,也不关心传入参数的数据 ...
- The App Life Cycle & The Main Function
The App Life Cycle Apps are a sophisticated interplay between your custom code and the system framew ...
- [Javascript] Required function arguments in Javascript
In Javascript, all function arguments are optional by default. That means if you ever forget to pass ...
- SetApartmentState(ApartmentState state).Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process
System.Threading.ThreadStateException: 'Current thread must be set to single thread apartment (STA) ...
- how to tell a function arguments length in js
how to tell a function arguments length in js JavaScript函数不对参数值(参数)执行任何检查 https://www.w3schools.com/ ...
随机推荐
- 获取本机IP
Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault<IPAddress>(a => a.AddressFam ...
- sqldeveloper
阅读文档:e12152-08 preferences 首选项,参数 panes 窗格 tabs 标签,选项卡 pin 别针,钉住 detach,move,dock 分离,移动,停靠 find data ...
- k8s DNS 服务发现的一个坑
按照官当文档,以及大家的实践进行k8s dns 服务发现搭建还是比较简单的,但是会有一个因为系统默认dns 配置造成的一个问题 1. linux 默认dns 配置在 /etc/resolv.conf ...
- Xcode插件安装 错选了Skip Bundle解决办法
1.首先找到Xcode的UUID,在终端运行defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID ...
- IOS开发--自定义segment控件,方便自定义样式
系统的segment控件太封闭,想换个颜色加个背景太难了,忍不住自己写一个,以备不时之需 这个控件给出了很多自定义属性的设置,用起来还是比较方便的,需要注意的 itemWidth如果不设置,则会按照控 ...
- 【转】JSch - Java实现的SFTP(文件下载详解篇)
上一篇讲述了使用JSch实现文件上传的功能,这一篇主要讲述一下JSch实现文件下载的功能.并介绍一些SFTP的辅助方法,如cd,ls等. 同样,JSch的文件下载也支持三种传输模式:OVERWRI ...
- web页面如何播放amr的音频文件
这个需求由来已久,公司的语音订单很多,每次客服都是从服务器down下语音来听.很不方便..于是我就上网扒拉看有么有什么web播放器能播放amr格式的音频文件,amr百度百科 总之找了很久.,,然后发现 ...
- EF执行SQL
1.EntityFramework 执行SQL语句进行参数化查询代码示例 参考:http://blog.csdn.net/chz_cslg/article/details/49002093
- Ubuntu 下安装 SQL Server 2016初探
安装步骤参官方 https://docs.microsoft.com/zh-cn/sql/linux/sql-server-linux-setup-ubuntu 执行命令如下: .Enter supe ...
- C# 系统错误日志处理类
编写软件,难免会有一些异常,针对异常我们在实际的开发中相比都有一些,捕获异常的处理办法.把软件运行错误信息写成一个 错误日志文件很有必要.当我们在客户那边安装调试时就会更加快捷的,知道错误在哪里.否则 ...