Verified Commit fa3a589e authored by Jeffrey H. Johnson's avatar Jeffrey H. Johnson
Browse files

multi: Update LICENSE file, add filename check.

LICENSE: Update LICENSE file with PD information.
src/ Update version to 1.1.1 (2021-03-04).
	    Remove (now unused) EDITOR definition.
	    Don't allow double quotes in filename.
parent 1eb74753
This program is freeware. Public Domain "Freeware" Software (No Copyright)
Use/modify as you wish.
- This work has been identified as being free of known
restrictions under copyright law, including all related and
neighboring rights.
You can copy, modify, distribute and perform the work, even
for commercial purposes, all without asking permission.
The work may not be free of known copyright restrictions in
all jurisdictions.
Persons may have other rights in or related to the work,
such as patent or trademark rights, and others may have
rights in how the work is used, such as publicity or
privacy rights.
In some jurisdictions moral rights of the author may
persist beyond the term of copyright. These rights may
include the right to be identified as the author and the
right to object to derogatory treatments.
Unless expressly stated otherwise, the person who
identified the work makes no warranties about the work, and
disclaims liability for all uses of the work, to the
fullest extent permitted by applicable law.
When using or citing the work, you should not imply
endorsement by the author or the person who identified the
// rvi - Revision Control System Interface <> // rvi - Revision Control System Interface; editor wrapper
// v1.0.0 - v1.0.2 by Melekam Mtsegaye <>
// v1.1.0 - v1.1.1 by Jeffrey H. Johnson <>
#define RVI_VERSION "1.1.0 (2021-03-04)" #define RVI_VERSION "v1.1.1 (2021-03-04)"
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
...@@ -37,16 +39,12 @@ ...@@ -37,16 +39,12 @@
#define CHECK_OUT_R "/usr/bin/co -q \"\0" #define CHECK_OUT_R "/usr/bin/co -q \"\0"
#define CHECK_IN "/usr/bin/ci -u -q \"\0" #define CHECK_IN "/usr/bin/ci -u -q \"\0"
#define EDITOR "/usr/bin/vi\0" // guy :)
#define REEDIT 2 #define REEDIT 2
#define ABORT 4 #define ABORT 4
#define DG_YES 6 #define DG_YES 6
#define DG_NO 8 #define DG_NO 8
#define DG_OTHER 0 #define DG_OTHER 0
//#define DEBUG
// protos // protos
void handle_error(int); void handle_error(int);
void do_filecheck(char *); void do_filecheck(char *);
...@@ -56,7 +54,7 @@ int dialog(); ...@@ -56,7 +54,7 @@ int dialog();
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
fprintf(stdout, "%s: Revision Control System Interface v%s\n", argv[0], fprintf(stdout, "%s: Revision Control System Interface %s\n", argv[0],
if (argc < 2 || argc > 3) { if (argc < 2 || argc > 3) {
fprintf(stdout, "Usage: %s <filename>\n", argv[0]); fprintf(stdout, "Usage: %s <filename>\n", argv[0]);
...@@ -183,9 +181,15 @@ void do_filecheck(char *filename) ...@@ -183,9 +181,15 @@ void do_filecheck(char *filename)
// concat RCSDIR + filename + RCSEXT // concat RCSDIR + filename + RCSEXT
memset(filecheck, -1, sizeof(struct stat)); memset(filecheck, -1, sizeof(struct stat));
char *fname = exec_cmd(param, 3, 1); char *fname = exec_cmd(param, 3, 1);
stat(fname, filecheck); char *qfnme = strstr(fname, "\"");
if (S_ISREG(filecheck->st_mode)) if (!qfnme) {
rcsfile_exists = 1; stat(fname, filecheck);
if (S_ISREG(filecheck->st_mode))
rcsfile_exists = 1;
} else {
fprintf(stderr, "Error: Filename may not contain double quotes.\n");
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment