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/ ...
随机推荐
- nginx入门篇----安装、部署、升级
1.安装前准备工作下载nginx安装包依赖包:gcc pcre pcre-level zlib zlib-devel openssl openss-level在线依赖包安装命令:yum -y ins ...
- return Acad::ErrorStatus::eOk引发error C2220: warning treated as error - no 'object' file generated
必须先Acad::ErrorStatus es; 然后return es. 补充: 如果把cpp中#include "*.h"和#include"stdafx.h&quo ...
- ecstore-lnmp环境下crontab不执行原因
因为lnmp.org默认禁止了proc_open函数,需要开启 开启后 lnmp restart ==== contab还是用crontab -e好,有些用www用户的似乎执行不了
- WPF中的image控件的Source赋值
WPF中的Image控件Source的设置 1.XAML中 简单的方式(Source="haha.png"); image控件的Source设置为相对路径后(Source=&quo ...
- MyBatis入门学习教程-MyBatis缓存
一.MyBatis缓存介绍 正如大多数持久层框架一样,MyBatis 同样提供了 package me.gacl.test; 2 import me.gacl.domain.User; import ...
- 公用表表达式(CTE)递归的生成帮助数据
本文的作者辛苦了,版权问题特声明本文出处:http://www.cnblogs.com/wy123/p/5960825.html 工作有时候会需要一些帮助数据,必须需要连续的数字,连续间隔的时间点,连 ...
- PowerProfile.java与power_profile.xml
转载自http://blog.csdn.net/green1900/article/details/42427871 现在诸多关于电池管理的应用做的极其绚烂,可实现如耗电应用排行.剩余时间计算.关闭耗 ...
- Bugtags 实时跟踪插件 - BugtagsInsta
BugtagsInsta 是 Bugtags SDK 的官方插件,应用集成成功后,可以在 Bugtags 云端管理平台实时查看应用的运行时数据:操作步骤.用户数据.控制台日志.Bugtags 日志.网 ...
- bootstrap下使用模态框,在模态框内输入框中回车时,模态框自动关闭的问题及解决方法
使用bootstrap下模态框,构建表单提交页面,但是输入框中直接回车,本来是想执行一下验证,但是却导致模态框自动关闭了. 遇到这样的问题,只需要先禁止回车触发表单提交 $(do ...
- 【转载】windows平台安装nodejs过程
第一步 下载nodejs 访问https://nodejs.org/en/download/url 根据您的系统是32位或64位,按照文字说明进行下载 第二步 安装nodejs 双击运行nodejs的 ...