OpenCores
URL https://opencores.org/ocsvn/xulalx25soc/xulalx25soc/trunk

Subversion Repositories xulalx25soc

[/] [xulalx25soc/] [trunk/] [sw/] [netusb.cpp] - Diff between revs 5 and 25

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 5 Rev 25
Line 158... Line 158...
                        } else if (nr > 0) {
                        } else if (nr > 0) {
                                usbp->write(lb.m_buf, nr);
                                usbp->write(lb.m_buf, nr);
                        } for(int i=0; i<nr; i++) {
                        } for(int i=0; i<nr; i++) {
                                lb.m_oline[lb.m_olen++] = lb.m_buf[i];
                                lb.m_oline[lb.m_olen++] = lb.m_buf[i];
                                assert(lb.m_buf[i] != '\0');
                                assert(lb.m_buf[i] != '\0');
                                if ((lb.m_oline[lb.m_olen-1]=='\n')||(lb.m_oline[lb.m_olen-1]=='\r')||(lb.m_olen >= (int)sizeof(lb.m_oline)-1)) {
                                if ((lb.m_oline[lb.m_olen-1]=='\n')
 
                                        ||(lb.m_oline[lb.m_olen-1]=='\r')
 
                                        ||(lb.m_olen >= (int)sizeof(lb.m_oline)-1)) {
                                        if (lb.m_olen >= (int)sizeof(lb.m_oline)-1)
                                        if (lb.m_olen >= (int)sizeof(lb.m_oline)-1)
                                                lb.m_oline[lb.m_olen] = '\0';
                                                lb.m_oline[lb.m_olen] = '\0';
                                        else
                                        else
                                                lb.m_oline[lb.m_olen-1] = '\0';
                                                lb.m_oline[lb.m_olen-1] = '\0';
                                        if (lb.m_olen > 1)
                                        if (lb.m_olen > 1)
Line 186... Line 188...
                        // Return our result if we have a network
                        // Return our result if we have a network
                        // connection
                        // connection
                        write(confd, lb.m_buf, nr);
                        write(confd, lb.m_buf, nr);
                } for(int i=0; i<nr; i++) {
                } for(int i=0; i<nr; i++) {
                        lb.m_iline[lb.m_ilen++] = lb.m_buf[i];
                        lb.m_iline[lb.m_ilen++] = lb.m_buf[i];
                        if ((lb.m_iline[lb.m_ilen-1]=='\n')||(lb.m_iline[lb.m_ilen-1]=='\r')||(lb.m_ilen>=sizeof(lb.m_iline)-1)) {
                        if ((lb.m_iline[lb.m_ilen-1]=='\n')
                                if (lb.m_ilen >= sizeof(lb.m_iline)-1)
                                ||(lb.m_iline[lb.m_ilen-1]=='\r')
 
                                ||(lb.m_ilen >= (int)sizeof(lb.m_iline)-1)) {
 
                                if (lb.m_ilen >= (int)sizeof(lb.m_iline)-1)
                                        lb.m_iline[lb.m_ilen] = '\0';
                                        lb.m_iline[lb.m_ilen] = '\0';
                                else
                                else
                                        lb.m_iline[lb.m_ilen-1] = '\0';
                                        lb.m_iline[lb.m_ilen-1] = '\0';
                                if (lb.m_ilen > 1)
                                if (lb.m_ilen > 1)
                                        printf("%c %s\n",
                                        printf("%c %s\n",

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.