\hypertarget{interfacedc__url_1_1urlresolve}{}\section{dc\+\_\+url\+:\+:urlresolve Interface Reference}
\label{interfacedc__url_1_1urlresolve}\index{dc\+\_\+url\+::urlresolve@{dc\+\_\+url\+::urlresolve}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
character(len=string) function \hyperlink{interfacedc__url_1_1urlresolve_a706391e97c4b887c66459f6bc4494409}{url\+\_\+resolve\+\_\+c} (relative, base)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 66 of file dc\+\_\+url.\+f90.



\subsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfacedc__url_1_1urlresolve_a706391e97c4b887c66459f6bc4494409}\label{interfacedc__url_1_1urlresolve_a706391e97c4b887c66459f6bc4494409}} 
\index{dc\+\_\+url\+::urlresolve@{dc\+\_\+url\+::urlresolve}!url\+\_\+resolve\+\_\+c@{url\+\_\+resolve\+\_\+c}}
\index{url\+\_\+resolve\+\_\+c@{url\+\_\+resolve\+\_\+c}!dc\+\_\+url\+::urlresolve@{dc\+\_\+url\+::urlresolve}}
\subsubsection{\texorpdfstring{url\+\_\+resolve\+\_\+c()}{url\_resolve\_c()}}
{\footnotesize\ttfamily character(len = string) function dc\+\_\+url\+::urlresolve\+::url\+\_\+resolve\+\_\+c (\begin{DoxyParamCaption}\item[{character(len = $\ast$), intent(in)}]{relative,  }\item[{character(len = $\ast$), intent(in)}]{base }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 405 of file dc\+\_\+url.\+f90.


\begin{DoxyCode}
405     \textcolor{comment}{!}
406     \textcolor{comment}{! relative で与えられる変数 URL が完全でない (ファイル名、 変数名、}
407     \textcolor{comment}{! 属性名、入出力範囲指定のどれかが無い) 場合に、 base}
408     \textcolor{comment}{! から補完します。}
409     \textcolor{comment}{!}
410     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1strhead}{strhead}
411     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}
412     \textcolor{keywordtype}{use }\hyperlink{namespacedc__trace}{dc\_trace}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}, \hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}, \hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}
413     \textcolor{keywordtype}{implicit none}
414     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: relative
415     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{intent(in)}:: base
416     \textcolor{keywordtype}{character(len = STRING)}:: result
417     \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{parameter}:: file = 1, var = 2, attr = 3, ior = 4
418     \textcolor{keywordtype}{character(len = STRING)}:: rel(file:ior), bas(file:ior)
419     \textcolor{keywordtype}{character(3)}, \textcolor{keywordtype}{parameter}:: pathdelim = \textcolor{stringliteral}{"/:"} // achar(94)
420     \textcolor{keywordtype}{integer}:: idir\_r, idir\_b
421   \textcolor{keywordflow}{continue}
422     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_aca1efe8bae50b85f74980a8c4d704dd8}{beginsub}(\textcolor{stringliteral}{'urlresolve'}, \textcolor{stringliteral}{'rel=<%c> base=<%c>'}, c1=relative, c2=base)
423     \textcolor{keyword}{call }\hyperlink{interfacedc__url_1_1urlsplit}{urlsplit}(trim(relative), file=rel(file), var=rel(var), &
424       & attr=rel(attr), iorange=rel(ior))
425     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'rel -> file=<%c> var=<%c> attr=<%c>'}, &
426       & c1=trim(rel(file)), c2=trim(rel(var)), &
427       & c3=(trim(rel(attr)) // \textcolor{stringliteral}{'> ior=<'} // trim(rel(ior))))
428     \textcolor{keyword}{call }\hyperlink{interfacedc__url_1_1urlsplit}{urlsplit}(base, file=bas(file), var=bas(var), &
429       & attr=bas(attr), iorange=bas(ior))
430     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_a2a38fceb4cf9baf298d63456238c3fea}{dbgmessage}(\textcolor{stringliteral}{'base -> file=<%s> var=<%s> attr=<%s> ior=<%s>'}, &
431       & c1=trim(bas(file)), c2=trim(bas(var)), &
432       & c3=(trim(bas(attr)) // \textcolor{stringliteral}{'> ior=<'} // trim(bas(ior))))
433     \textcolor{comment}{! --- ファイル名を欠くばあいは単に補う ---}
434     \textcolor{keywordflow}{if} (rel(file) == \textcolor{stringliteral}{""}) \textcolor{keywordflow}{then}
435       rel(file) = bas(file)
436       \textcolor{keywordflow}{if} (rel(var) == \textcolor{stringliteral}{""}) &
437         & rel(var) = bas(var)
438       result = \hyperlink{interfacedc__url_1_1urlmerge}{urlmerge}(file=rel(file), var=rel(var), &
439         & attr=rel(attr), iorange=rel(ior))
440       \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(\textcolor{stringliteral}{'urlresolve'}, \textcolor{stringliteral}{'1 result=%c'}, c1=trim(result))
441       \textcolor{keywordflow}{return}
442 \textcolor{keywordflow}{    endif}
443     \textcolor{comment}{! --- 絶対パス (と見られる) ファイル名はそのまま使用 ---}
444     \textcolor{keywordflow}{if} (\hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), \textcolor{stringliteral}{"file:"}) &
445       & .OR. \hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), \textcolor{stringliteral}{"http:"}) &
446       & .OR. \hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), \textcolor{stringliteral}{"ftp:"}) &
447       & .OR. \hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), \textcolor{stringliteral}{"news:"}) &
448       & .OR. \hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), \textcolor{stringliteral}{"www"}) &
449       & .OR. \hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), \textcolor{stringliteral}{"/"}) &
450       & .OR. \hyperlink{interfacedc__string_1_1strhead}{strhead}(rel(file), achar(94)) &
451       & .OR. rel(file)(2:2) == \textcolor{stringliteral}{":"} &
452       ) \textcolor{keywordflow}{then}
453       result = relative
454       \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(\textcolor{stringliteral}{'urlresolve'}, \textcolor{stringliteral}{'2 result=%c'}, c1=trim(result))
455       \textcolor{keywordflow}{return}
456 \textcolor{keywordflow}{    endif}
457     \textcolor{comment}{! ディレクトリ名の取り出し}
458     idir\_b = scan(bas(file), pathdelim, back=.true.) 
459     \textcolor{keywordflow}{if} (idir\_b == 0) \textcolor{keywordflow}{then}
460       \textcolor{comment}{! が、できなければ、（エラーとすべきかもしれぬが）}
461       \textcolor{comment}{! 相対パスをそのまま使用}
462       result = relative
463       \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(\textcolor{stringliteral}{'urlresolve'}, \textcolor{stringliteral}{'3 result=%c'}, c1=trim(result))
464       \textcolor{keywordflow}{return}
465 \textcolor{keywordflow}{    endif}
466     \textcolor{comment}{! 相対パスのほうのディレクトリ名の取り出し}
467     idir\_r = scan(rel(file), pathdelim, back=.true.)
468     \textcolor{keywordflow}{if} (idir\_r == 0) \textcolor{keywordflow}{then}
469       \textcolor{comment}{! ができなければ全体を使用}
470       idir\_r = 1
471 \textcolor{keywordflow}{    endif}
472     result = base(1: idir\_b) // relative(idir\_r: )
473     \textcolor{keyword}{call }\hyperlink{namespacedc__trace_ae44de97565a3bdd685789c7748b37e37}{endsub}(\textcolor{stringliteral}{'urlresolve'}, \textcolor{stringliteral}{'4 result=%c'}, c1=trim(result))
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
dc\+\_\+utils/\hyperlink{dc__url_8f90}{dc\+\_\+url.\+f90}\end{DoxyCompactItemize}
