tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tsp-devel] Source indentation


From: Yves DUF
Subject: Re: [Tsp-devel] Source indentation
Date: Wed, 25 Apr 2007 14:44:08 +0200

I got a nice URL on that subject : http://www.ibiblio.org/pub/Linux/docs/HOWTO/translations/fr/html-1page/C-C++Beautifier-HOWTO.html

Did you try with "cb" ?


2007/4/24, address@hidden <address@hidden>:
I just ran:
$ find ~/Prog/tsp -name '*.[ch]' -exec indent -i8 -kr {} \;
$ cvs diff 2>&1 | tee diff
$ ls -lh diff
-rw-r--r-- 1 def def 3.5M Apr 24 17:24 diff

The drawback is that some of the code looks bad as a result:
                if (!
                    (strcmp
                     ((char *) cur_node->name, XNN_TSP_SAMPLE_CONFIG))) {
                        cur_node = cur_node->children;
                } else {
                        if (!
                            (strcmp
                             ((char *) cur_node->name,
                              XNN_TSP_PROVIDERS))) {
                                cur_node = cur_node->children;
                        } else {
                                if (!
                                    (strcmp
                                     ((char *) cur_node->name,
                                      XNN_PROVIDER))) {
                                        ++nb_provider;
                                }

                                cur_node = cur_node->next;
                        }

                }

in ./src/util/libtspcfg/tspcfg_file.c for example.
But I'd go for it anyway, hoping that little by little we'll get the sources
right.
Any thoughts?
Regards,
Frederik


_______________________________________________
Tsp-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tsp-devel



--
Un autre monde est possible,
il suffit juste qu'on s'y mette tous !
reply via email to

[Prev in Thread] Current Thread [Next in Thread]