Midnight Home   *   Support Home   *   K Home  
Vantive Cases   Technotes   All   Defects   Old Cases   --   Case Report   --   Q   --   Help

[Previous Doc] [Next Doc]

TechnoteID: 22347   Vantive creation date: 10/19/2001   Modified: 10/30/2001
StateTypeProduct GroupProductImpactCreated byModified by
PublishExternalRose RealTimeRose-RTHighmshort / Michael Joseph Shortmshort / Michael Joseph Short

Subject: ^M is added to source code when copying and pasting

PRODUCT: All versions of Rose RealTime
OS: SunOS
DEFECT #: 56893, 59888
PATCH #: Fixed in latest patch
REFERENCES:

CREATED: 19-OCT-2001
REVISED:   29-OCT-2001

SYMPTOM:

^M is added to source code when copying and pasting from a SUN workstation.

The ^M is added into the petal files and the code generator also puts these in
the C++ source files.

CAUSE:

Using the SUN special keys 'Copy' 'Paste' and 'Cut' (not Ctrl-C, Ctrl-X,
Ctrl-V) to transfer code from place to place within Rational Rose Real Time.

RESOLUTION:

Applying the latest patch to a Rose RealTime installation will prevent this
problem from reoccurring, but will not remove existing ^M characters from a
model's saved files.   If your Rose RealTime version is 6.3.132.0 or later, this
problem is not present.   If your version number is below 6.3.132.0, there is a
workaround: use the Ctrl-C, Ctrl-X and Ctrl-V keys instead of the SUN
keyboard's special keys.

In order to remove the ^M from all existing files a script is used. This script
will correct any text files found in the specified directory and below (i.e it
recurses the directory structure.) This script relies on the dos2unix command
to achieve this.   (If you do not have dos2unix in your environment, the script
can be altered and   "sed" can be used instead.)

====================================
#! /bin/sh

if [ $# != 1 ]
then
      printf "This script will remove all ^M's from all plain files,\n"
      printf "recursively, starting from the specified directory\n\n"
      printf "NOTE: dos2unix must be in your path environment variable\n\n"
      printf "Usage: rmCtrl-M <directory>\n\n"
      exit
fi

for file in `find $1 -type f -name "*" -print`
do
      printf "Converting file $file\n"
      `dos2unix $file $file > /dev/null 2>&1`
done
exit
====================================

The recommended procedure is:

1)   Build->Clean

2)   Check out all model files, if necessary.

3)   Run the script on the model storage directories to remove the ^M's from the
petal files.

4)   Check in all files, if necessary

5)   Apply the latest patches to your Rose RealTime installation, to prevent
reoccurrence of the problem or use the workaround identified above.


<<<<<<<<<<<<<<<<<<<<<<<<<<<<
THE MATERIAL AND/OR SOFTWARE IS PROVIDED 'AS IS'.   RATIONAL AND ITS THIRD PARTY
LICENSORS DISCLAIM ALL WARRANTIES EXPRESS OR IMPLIED INCLUDING, WITHOUT
LIMITATION, THE WARRANTY OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE OR FITNESS
FOR A PARTICULAR PURPOSE OR ARISING OUT OF THE COURSE OF DEALING, USAGE OR
TRADE PRACTICE, CONTENT OF THE MATERIAL OR SOFTWARE. RATIONAL MAKES NO
WARRANTIES OR REPRESENTATIONS REGARDING THE ACCURACY OR COMPLETENESS OF THE
MATERIAL AND/OR SOFTWARE PROVIDED OR THAT IT WILL MEET LICENSEE'S REQUIREMENTS
OR THAT THE MATERIAL AND/OR SOFTWARE WILL BE ERROR   FREE.   IN NO EVENT SHALL
RATIONAL OR ITS LICENSORS BE LIABLE TO LICENSEE OR A THIRD PARTY FOR ANY
INDIRECT, DIRECT, NEGLIGENCE, SPECIAL, OR CONSEQUENTIAL DAMAGES INCLUDING LOST
PROFITS, LOST DATA AND THE LIKE ARISING OUT OF OR IN CONNECTION WITH THIS
RECEIPT OF MATERIAL AND/OR SOFTWARE EVEN IF RATIONAL HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.


For more information, contact Rational Software Customer Support.


*************** Additional INTERNAL ONLY information ***************

This version of the technote wil be upgrade and improved with a better script ect when time allows!

This report was generated on Mon Nov 5 22:58:06 2001 (Local server time).

[Previous Doc] [Next Doc]
Vantive Cases   Technotes   All   Defects   Old Cases   --   Case Report   --   Q   --   Help

Copyright © 1995-2000 Rational Software Corporation.  All rights reserved.
Legal information and policies | Privacy Statement