aboutsummaryrefslogtreecommitdiff
path: root/Ada95/samples/split-path.awk
diff options
context:
space:
mode:
Diffstat (limited to 'Ada95/samples/split-path.awk')
-rw-r--r--Ada95/samples/split-path.awk6
1 files changed, 4 insertions, 2 deletions
diff --git a/Ada95/samples/split-path.awk b/Ada95/samples/split-path.awk
index 86e8ccdc10f1..5b340ba5cd6a 100644
--- a/Ada95/samples/split-path.awk
+++ b/Ada95/samples/split-path.awk
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright 2020 Thomas E. Dickey #
+# Copyright 2020,2022 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,9 +28,11 @@
#
# Author: Thomas E. Dickey
#
-# $Id: split-path.awk,v 1.3 2020/02/02 23:34:34 tom Exp $
+# $Id: split-path.awk,v 1.4 2022/11/26 23:46:20 tom Exp $
BEGIN { cols = 72; }
/[$]THIS_DATADIR/ {
+ if (substr(this_datadir, length(this_datadir)) != "/")
+ this_datadir = this_datadir "/";
gsub("[$]THIS_DATADIR", "\"" this_datadir "\"");
if ( length ($0) > cols ) {
indent = index($0, "\"") - 1;