• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

*NIX用コマンドライン手順書自動作成ツール開発


Commit MetaInfo

修訂a2abb73bed073c26843e24233f4ca4790ae6a36d (tree)
時間2016-09-04 20:44:09
作者Koine Yuusuke(koinec) <koinec@user...>
CommiterKoine Yuusuke(koinec)

Log Message

* AddFiles: Add default config. param. setting header.(config.h)

Change Summary

差異

--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,7 @@ PARTS_OBJS = cmdline.o \
3838 outbuffer.o \
3939 depend_freebsd.o
4040 HEADERS = procedure.h \
41+ config.h \
4142 master.h \
4243 cmdline.h \
4344 outbuffer.h \
--- /dev/null
+++ b/config.h
@@ -0,0 +1,42 @@
1+/*PrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcE
2+ *
3+ * procedure - Command-Line Procedure Manual generater for FreeBSD/Linux
4+ *
5+ * Copyrihgt (c) 2016 Koine Yuusuke (koinec). / All Rights Reserved.
6+ *
7+ * Redistribution and use in source and binary forms, with or without
8+ * modification, are permitted provided that the following conditions
9+ * are met:
10+ * 1. Redistributions of source code must retain the above copyright
11+ * notice, this list of conditions and the following disclaimer.
12+ * 2. Redistributions in binary form must reproduce the above copyright
13+ * notice, this list of conditions and the following disclaimer in the
14+ * documentation and/or other materials provided with the distribution.
15+ * 4. Neither the name of the University nor the names of its contributors
16+ * may be used to endorse or promote products derived from this software
17+ * without specific prior written permission.
18+ *
19+ * THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND
20+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29+ * SUCH DAMAGE.
30+ *
31+PrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcE*/
32+
33+#ifndef PROCEDURE_HEADER_CONFIG
34+#define PROCEDURE_HEADER_CONFIG
35+
36+#define OUTPUT_RINGBUFFER_SIZE 4096
37+#define DEFAULT_OUTPUT_FILENAME "procedure.txt"
38+
39+#endif
40+
41+/* EOF ======================================================================*/
42+
--- a/master.c
+++ b/master.c
@@ -62,6 +62,12 @@ static int
6262 i_err += -0x20;
6363 goto goto_InitMasterProcess_post;
6464 }
65+
66+ i_err = OutBuffer_Init( OUTPUT_RINGBUFFER_SIZE );
67+ if( 0x00 != i_err ) {
68+ i_err += -0x30;
69+ goto goto_InitMasterProcess_post;
70+ }
6571
6672 goto_InitMasterProcess_post:
6773 return i_err;
@@ -81,6 +87,7 @@ static void
8187 (void)fclose( fscript );
8288 (void)close( gi_fd_master );
8389
90+ (void)OutBuffer_Term();
8491 (void)CmdLine_Term();
8592 (void)TermDependOS();
8693
--- a/procedure.c
+++ b/procedure.c
@@ -76,7 +76,7 @@ int
7676
7777 argv += 1;
7878
79- fname = "procedure.txt";
79+ fname = DEFAULT_OUTPUT_FILENAME;
8080
8181 if ((fscript = fopen(fname, "w")) == NULL)
8282 err(1, "%s", fname);
--- a/procedure.h
+++ b/procedure.h
@@ -49,6 +49,8 @@ PrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcEdUrEpRoCeDuRePrOcE*/
4949 #include <termios.h>
5050 #include <unistd.h>
5151
52+#include "config.h"
53+
5254 #include "master.h"
5355 #include "cmdline.h"
5456 #include "outbuffer.h"