Microchip
直播中

李娓仑

7年用户 1332经验值
私信 关注
[问答]

CVS插件如何保持CVS结账不添加额外的回车到c源

我已经安装了MPLAB X V4.15,并启用了CVS插件。当源被签出时,一些C和H文件(不是全部)增加了额外的行终止符——它是一个回车。这个额外的空白导致多行宏定义的编译错误——尤其是FreeRTOS和FATFS文件。如何关闭添加额外的回车的功能?提前感谢(新到MPLAB X)THOM

以上来自于百度翻译


      以下为原文

    I've installed MPLab X v4.15 and have the CVS plugin enabled.    When source is checked out, some of the c and h files (not all) are getting extra line terminators added - it's a carriage return.   This extra white space causes compile errors on multi line macro definitions - especially with FreeRTOS and FatFS files.

How can I turn off the feature of adding extra carriage returns?

Thanks in advance (new to MPLab X)

Thom

回帖(5)

吴键洪

2018-10-30 15:25:52
你在哪个站台上?是Windows还是Linux?我怀疑您在Windows样式(CRLF)和UNIX风格(LF)行终结符之间存在不兼容。

以上来自于百度翻译


      以下为原文

    What platform are you on?
Windows, or Linux?
I suspect you have an incompatibility between Windows style (CRLF), and Unix style (LF only) line terminators.
 
举报

杨玲

2018-10-30 15:44:36
你说的“额外”回车是什么意思?文件结束时有一个换行符和两个回车符?或者是从LF转换到CRLF?您的CVS服务器运行哪个操作系统?你正在运行哪些操作系统?如果你用命令行客户机来代替X插件,你是否也有同样的问题?

以上来自于百度翻译


      以下为原文

    What do you mean by an "extra" carriage return?  The file ends up with a line feed and two carriage returns?  Or is it being converted from LF to CRLF? Which operating system does your CVS server run on?  Which OS are you running X on?  Do you have the same problem if you check in/out with a command line client instead of the X plugin?
举报

刘嵘

2018-10-30 16:01:47
我在Windows 7上。FrReTOS和FATFS文件有一个CRLF终止。当我结账时,我得到了一个额外的CR(这是我认为的MAC格式的终止)。我在命令行中安装了CygWin和CVS。它有同样的问题(额外的CR)。在阅读CygWin的CVS man页面并尝试各种各样的东西(比如忽略.cHCRC)之后,CygWin签出神奇地开始工作,我现在没有额外的回车,但是,我不确定我是怎么解决这个问题的。我怀疑这个开发PC被5 + YE污染了。安装了ARS,它安装了一个老式SMATCV。我在另一台笔记本上安装了MPLAB X(V4.05),并下载了CVS插件。这与附加的CR有相同的问题。我希望有一种方法来附加损坏的源文件或一个工具的屏幕截图,该工具显示了额外的终结者-似乎无法确定在这个论坛中附加图像的URL(我使用文件化而不是网页)。在CygWin中,有一个实用程序DOS2UNIX,显示行终止$DOS2UNIX-I CROUTIN .C 395 0 No.BONM文本CROUTIN .C[图像] C:PRJCROTENEC。PNG/[图像]这里是解码的主页:-I[FLAG],-FIAN[= FLAG]文件…显示文件信息。不进行转换。下面的信息按以下顺序打印:DOS断线数、UNIX断线数、MAC行中断数、字节顺序标记、文本或二进制数、文件名。示例输出:6×0 0 NosibOm文本DOS.TXT 0 6 0 NosiBOM文本UNIX.TXT 0 0 6 Nosi-BOM文本MAC.TXT 6 6 6TXT 50的文本混合。TXT 0 UTF-16LE文本UTF16L.TXT 0 50 50 0 Nosibof文本UTF8Unx.TXT 50 0 0 UTF-8文本UTF8DOS.TXT 2 418 219 NosibOm二进制DOS2UNIX.EXE

以上来自于百度翻译


      以下为原文

    I'm on Windows 7.
The FreeRTOS and FatFS files have a CRLF termination.  When I checkout, I end up with an extra CR (this is the old Mac style of termination I believe).
 
I installed cygwin and cvs in the command line.  It had the same issue (extra CR).   After reading the cvs man page in cygwin and trying various things (such as ignore .cshrc), cygwin checkouts magically started working and I now DONT have the additional Carriage Returns, But, not sure what I did to fix the problem.
 
I am suspecting that this development PC is quite polluted by 5+ years of installs and it had an older SmartCVS installed.
 
I have installed MPLab X (v4.05) on another laptop and downloaded the CVS plugin.   This has the same problem with the additional CR.   
 
I wish there was a way to attach the damaged source file or a screenshot of a tool that shows the extra terminator - cant seem to figure out the URL for attaching an image in this forum (I work with a filesytem not a webpage).   
 
In cygwin, there is a utility dos2unix that shows the line termination
 
$ dos2unix -i croutine.c
395 0 395 no_bom text croutine.c
[image]c:prjcroutinec.png[/image]
Here's the manpage to decode:
-i[FLAGS], --info[=FLAGS] FILE ...
Display file information. No conversion is done.
The following information is printed, in this order: number of DOS
line breaks, number of Unix line breaks, number of Mac line breaks,
byte order mark, text or binary, file name.
Example output:
6 0 0 no_bom text dos.txt
0 6 0 no_bom text unix.txt
0 0 6 no_bom text mac.txt
6 6 6 no_bom text mixed.txt
50 0 0 UTF-16LE text utf16le.txt
0 50 0 no_bom text utf8unix.txt
50 0 0 UTF-8 text utf8dos.txt
2 418 219 no_bom binary dos2unix.exe
 
举报

刘嵘

2018-10-30 16:20:30
(找出文件附件到论坛)-见附件的编辑器,显示终止符字符在FreRotos文件CROUTIN C上。

以上来自于百度翻译


      以下为原文

    (Figured out the file attachment to the forum) - see attached for an editor that displays the terminator chars on the FreeRTOS file croutine.c
   Attached Image(s)

举报

更多回帖

发帖
×
20
完善资料,
赚取积分