32
33
34
37
38
39
40#include "implicit_f.inc"
41
42
43
44 INTEGER,INTENT(IN) :: ID,ITYPE,SBUFMSG
45 CHARACTER(LEN=NCHARLINE100), INTENT(IN) :: BUFMSG(SBUFMSG)
46
47
48
49 INTEGER I,J,JDX,IBACKSLASH
50
51
52
53 IF (
ALLOCATED(messages(itype,
id)%MESSAGE))
THEN
54 DEALLOCATE(messages(itype,
id)%MESSAGE)
55 END IF
56 IF (sbufmsg==0) THEN
57 messages(itype,
id)%SMESSAGE=1
58 ALLOCATE(messages(itype,
id)%MESSAGE(1))
59 IF (itype==1) THEN
60 messages(itype,
id)%MESSAGE(1)=
' !!! EMPTY TITLE !!! '
61 ELSE IF (itype==2) THEN
62 messages(itype,
id)%MESSAGE(1)=
' !!! EMPTY DESCRIPTION !!! '
63 END IF
64 ELSE
65 ALLOCATE(messages(itype,
id)%MESSAGE(sbufmsg))
66 messages(itype,
id)%SMESSAGE=sbufmsg
67 DO i=1,sbufmsg
68 jdx=1
69 messages(itype,
id)%MESSAGE(i)=
' '
70 j=1
72 IF (bufmsg(i)(j:j)==achar(92)) then
73
75 j=j+1
76 IF (bufmsg(i)(j:j)=='n') THEN
77 messages(itype,
id)%MESSAGE(i)(jdx:jdx)=char(10)
78 jdx=jdx+1
79
80 ELSE
81
82 messages(itype,
id)%MESSAGE(i)(jdx:jdx)= bufmsg(i)(j-1:j-1)
83 jdx=jdx+1
84 messages(itype,
id)%MESSAGE(i)(jdx:jdx)= bufmsg(i)(j:j)
85 jdx=jdx+1
86 END IF
87 ELSE
88
89 j=j+1
90 END IF
91 ELSE
92 messages(itype,
id)%MESSAGE(i)(jdx:jdx)=bufmsg(i)(j:j)
93 jdx=jdx+1
94 END IF
95 j=j+1
96 END DO
97 END DO
98 END IF
integer, parameter ncharline100